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.

encoding problem. (asian language)

Old posts that have not been replied to for several years.
Locked
a
ac1d
Voice
Posts: 15
Joined: Mon May 02, 2005 2:02 am

encoding problem. (asian language)

Post by ac1d »

hello. i'm using eggdrop 1.6.17 with tcl 8.4.3
after encoding changes of tcl 8.1, newer versions of tcl doesn't work with asian language.
so i was using eggdrop 1.6.17 with tcl 8.0.4 cause of encoding problem.
but since newer scripts requires latest tcl, i'm trying to get it work with latest tcl.
have turned on tcl and set commands for eggdrop.
so when i try to change encoding type to euc-kr
it just seems nothing is wrong in dcc
but still doesn't work with double-width language (euc-kr)

i tried ".tcl a [encoding convertto euc-kr "blah"]"

any scripts that works with UTF-8 is working.
but few scripts that doesn't support UTF-8 are showing crashed texts.
if there's anyway to change encoding type for eggdrop
please help me.

/note that i want to change whole encoding type. not specific text.
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

hmm, cant you try to convert the euc-kr scripts to utf-8? I have made a quick lookup in the eggdrop source. It seems everything is utf hardcoded, there seems not to be a switch or something like that. However, I saw a #ifdef for TCL encoding use. you could try to use the "old" methode supposed to be used for tcl preior to 8.1. But i am not sure if this only used for buildin tcl comands.
cmd.c, line 2228 wrote:#ifdef USE_TCL_ENCODING
/* properly convert string to system encoding. */
Tcl_DStringInit(&dstr);
Tcl_UtfToExternalDString(NULL, interp->result, -1, &dstr);
result = Tcl_DStringValue(&dstr);
#else
/* use old pre-Tcl 8.1 way. */
result = interp->result;
#endif
You can find some more lines, if you search for "ifdef USE_TCL_ENCODING" even in other files. with luck you can make him somehow to compile with USE_TCL_ENCODING = FALSE. This wouldn't change the encoding to euc-kr, but with a bit luck the way it was before 8.1 ;).
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
a
ac1d
Voice
Posts: 15
Joined: Mon May 02, 2005 2:02 am

Post by ac1d »

Hello again De Kus!

Basically korean isn't compatible with utf-8. so i must use euc-kr.
scripted in utf-8 but it's kinda 'grab from web' style script and the dest site is korean. so it is.
since i'm just one of newbie. not script friendly.
i don't understand what that is and how to.
but i'll try.

Thank you always De Kus.
(can i pm you on irc?)
Locked