Activity Stream
48,167 MEMBERS
63630 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 2 of 2
  1.     
    #1
    Member

    Default c# UrlEncode asciiArt

    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*
    evlo Reviewed by evlo on . c# UrlEncode asciiArt 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 Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Hmm, now i see it is still posting crap, did anyone get it working?

    EDIT: now if i use it like
    Code: 
    string htmlEncodedPostText = HttpUtility.UrlEncode(postText, Encoding.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 ...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. php urlencode problem
    By mahjong in forum Web Development Area
    Replies: 4
    Last Post: 2nd Nov 2011, 02:41 PM

Tags for this Thread

BE SOCIAL