Sunday 15 June 2014

character encoding - mIRC Socket Chartset Fail -


Then I'm MIRC 7.21 that has the default UTF-8 enabled in it.
Then I have this socket:

  on *: sockopen: _tmdb _ *: {sockwrite -tn $ sockname $ hget ($ sockname, url) HTTP / 1.1 sockwrite -tn $ Sockname host: "no" sockwrite -tn $ sockname user-agent: mirc-api / v1-alpha sockwrite -tn $ sockname accept: application / jason sockwrite -tn $ sockname connection: off sockwrite -tn $ sockname $ crlf $ + $ Crlf}   

I'm getting these headers from remote server by default:

  [header] http / 1.1 200 OK [header] Access-Control-Permission-Origin: * [Header] Age: 0 [Header] Cash-Control: Arwajnik, max-age = 3600 [header] Content-Type: application / Jason; Charset = UTF-8 .....   

And though, when I am trying to change the language, this reaction is written in English:

  Extended Play 2006 47247   

I am requesting API server and defining & amp; Language = l I am getting this:

Header:

  [header] HTTP / 1.1 200 OK [header] Access-control-permission-origin: * [header ] Age: 0 [Headers] Cash-Control: Public, Maximum-Age = 3600 [Header] Content-Type: Application / Jason; Charset = UTF-8 .....   

Result:

  Î ?? A Î ?? ÂÎ ?? One half Î ?? Μ Î ?? One? º? Â Î Î â â Î Î Î ?? One ???? Î ?? Î ?? One ???? Î ?? Î ?? Î ?? Î ?? Î ?? Î? A ± 2006 47247   

When I open the archived JSON file, the MIC is downloading ... I can fix the Greek charset. MIRC can not do any idea why my charset is getting messed up through sockets? I mean I just have a small / echo-A Î Îμν½ ???? Îμ Î »ÎμÏ ?? Ï? Can I write with Î ± Î ± Πκ Î Î Î Î? And it looks just fine. However, messing through the sockets ..
extended play

  if $ utfdecode ($ utfencode ($ 1-, 162)) {...}   

Charset code below, our pigment code 162

  000 - ANSI_chareset 001 - Symbol_Caretti 077 - MAC_CARSET 128 - SHIFTGIES_CHARSET129 - HANGIUL_CARSET 130 - JOB_BAREACE 134 - GB2312_CHARSET 136 - CHINIBIS 5_CHARESTA 161 - Greek_charez - TURKISH_CHARSET 163 - VIETNAMESE_CHARSET 177 - HEBREW_CHARSET 178 - ARABIC_CHARSET 186 - BALTIC_CHARSET 204 - RUSSIAN_CHARSET 222 - THAI_CHARSET 238 - EASTEUROPE_CHARSET 255 - OEM_CHARSET    

No comments:

Post a Comment