Skip to content

Loading…

unicode (utf8 actually) characters not handled correctly #4

Open
thommey opened this Issue · 2 comments

2 participants

@thommey
Eggheads member
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

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

@thommey thommey added the defect label
@thommey thommey self-assigned this
@Pixelz Pixelz added this to the v1.6.22 milestone
@thommey thommey added pri: blocker and removed pri: blocker labels
@thommey
Eggheads member

todo: fix encoding of language files

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.