mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2004
Posts: 10
T
Pikka bird
OP Offline
Pikka bird
T
Joined: May 2004
Posts: 10
Hi. I'm having a little problem using sockets under mirc. I made a script to use a site for translating words on the fly. Everything was working fine until recently. I went to see what was wrong and found that the response from the site was encoded. After that, I check the header of the answer, and I found this : Transfer-Encoding: chunked. So I thought, it's chunked encoding text! (Unbelievable..) Now i'm trying to decode it... I thought the $decode function in mirc could do that, but I can't make it work... Please let me know if there's something else I need to try, or some information I've overlooked.
Thank you.

PS: If this can help, the site I am working with is Altavista's Babelfish translation service. And the header has something like this in it : Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8
And i get something like this in the answer : ¼ksÛ6òsõ+Pv’&7õ´cK

Joined: May 2003
Posts: 161
A
Vogon poet
Offline
Vogon poet
A
Joined: May 2003
Posts: 161
At the end of the get line, put HTTP/1.0 instead of HTTP/1.1, the server should send it normally then

Joined: May 2004
Posts: 10
T
Pikka bird
OP Offline
Pikka bird
T
Joined: May 2004
Posts: 10
Thank you for your answer. I tried but same result. Actually, the header always start by HTTP/1.1 200 OK even if I put 1.0 instead of 1.1. Hum by the way it's a POST method but i don't think that's the problem? If you have another idea... I'll be glad to try it out!
Thanks.

PS :I'm not sure, but I think the text was previously sent using this -> charset=ISO-8859-1 and now it's ->charset=UTF-8
I'm a little lost...


Link Copied to Clipboard