This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

HOW:enabling/switching to UTF-8 or CentralEuropean encoding?

Help for those learning Tcl or writing their own scripts.
Post Reply
b
burek
Voice
Posts: 1
Joined: Mon Mar 13, 2006 5:18 pm

HOW:enabling/switching to UTF-8 or CentralEuropean encoding?

Post by burek »

Hi everybody,

I apologize if this question has been asked before, but I couldn't find the answer even after searching this forum, so, here it is.

Shortly, I have a working tcl script on my eggdrop which collects some data from a certain web site and parses it before displaying the data on the irc channel. Ok, so, the only problem here is the web page is UTF-8 encoded, so I get all the text correct except for some characters which, obviously don't display when putlog-ed on irc channel. And not only that, those characters even stop printing of the other characters after them.

Lets say I have a string (on the web page) like this:
"abcdefXghijk" (where X is a double byte UTF-8 encoded letter)

after I grab the page in the buffer and print it with a putlog on irc, I get this:
"abcdef"
and that's it. I can guess it has something to do with the null character or so, but to be honest I don't know how to solve this..

So, I've seen some posts about:
[encoding convertfrom identity $a]
or something like that, but I don't have it in my documentation, and I would like to ask if you can help me how to solve this problem..

P.S. I'm using egghttp.tcl for async socket connections, but I don't think it's the one who is responsible for this behavior..?


Thanx a lot in advance,
burek.
Post Reply