Skip to content

unicode (utf8 actually) characters not handled correctly #4

Open
thommey opened this Issue Feb 2, 2010 · 2 comments

2 participants

@thommey
Eggheads member
thommey commented Feb 2, 2010
Trac Data
Ticket 4
Reported by Arkadiusz Miskiewicz
Status assigned
Component Core
Priority blocker
Milestone 1.8.0
Keywords utf unicode
Version 1.8.0 CVS

My setup:

eggdrop 1.6.17
tcl 8.5a6
Linux 2.6 with latest version of libraries and all stuff
freenode network
irssi client

Testing is simple, tcl script that echoes data back to channel:
bind pub - "utf" pub_proc
proc pub_proc { nick idx handle channel szoveg } {
putmsg $channel "$szoveg"
}

Now on original 1.6.17 when entering utf8 characters this happens:
21:39 < arekm8> utf óąłńś
21:39 < utftest> �EBD[
(some crap is echoed)

After patching src/tcl.c utf_convert() with:

  • byteptr = (char *) Tcl_GetByteArrayFromObj(objv[i], &len);
  • byteptr = (char *) Tcl_GetStringFromObj(objv[i], &len);

I get:
21:57 < arekm8> utf óąłńś
21:57 < utftest> óąłńś

It works - proper characters are echoed back.

No idea why ByteArray is used in utf_convert() so I'm not sure if the fix is
correct. Is it?

@thommey
Eggheads member
thommey commented Mar 30, 2012

Comment by @skralg
putlog may handle utf-8 separately and need additional changes

@thommey thommey added the defect label Oct 13, 2015
@thommey thommey self-assigned this Oct 13, 2015
@Pixelz Pixelz added this to the v1.6.22 milestone Jan 11, 2016
@thommey thommey added pri: blocker and removed pri: blocker labels Jan 26, 2016
@thommey
Eggheads member
thommey commented Feb 5, 2016

todo: fix encoding of language files

This was referenced Feb 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.