Skip to content
WJunction - Webmaster Forum

c# UrlEncode asciiArt

Status
Not open for further replies.

evlo

Established Member
137
2011
4
Hello, i would like to post NFO as TEXT to website, however i have poblem with sites that are ISO-8859-1 (maybe also only vbuletin ones :) ). I use System.Web.HttpUtility.UrlEncode to conver text to valid string that would send to webpage, but it is encoded differently than firefox does. Firefox encodes ascii art character to ie. %u2588, but my poster to %96 (etc.), definitely i never managed it to encode into %u*, i tried supplementing urlencode string in various encoding and also tried to specify its encodings parameter, but without success. What is the magic?

I'm 100% sure that i managed to convert nfo to UTF8 successfully.

EDIT: omg, now i found UrlEncodeUnicode *FACEPALM*
 
Last edited:

1 comment

Hmm, now i see it is still posting crap, did anyone get it working?

EDIT: now if i use it like
Code:
[COLOR=blue]string[/COLOR] htmlEncodedPostText = [COLOR=#2b91af]HttpUtility[/COLOR].UrlEncode(postText, [COLOR=#2b91af]Encoding[/COLOR].GetEncoding(encoding));
I get 100% result on UTF8 boards and on ISO-8859-1 i get "?" instead of asciiart character, but this is best result so far. Again postText contains correctly formatted asciiart with correct "graphics" characters.

Maybe it has something to do with sent http request itself, but only encoding related thing i found in it is Accept-Encoding and that clearly is accept ...
 
Last edited:
Status
Not open for further replies.

About the author

E
Established Member · Joined
137
Messages
4
Reactions
18
Points
Grow your business

Advertise on WJunction

Connect with an established international community of webmasters, hosting providers, developers and online entrepreneurs.

  • Premium & Premium+ Sticky
  • Dedicated section banners
  • Site-wide banner advertising
Explore advertising options
Back
Top Bottom