Closed GoogleCodeExporter closed 8 years ago
Is this problem only in the log? Can you provide a screenshot? It is very hard
for me to debug this without a
Korean client in hand.
Original comment by evlogimenos
on 4 Apr 2009 at 5:34
Is this problem only in the log? Can you provide a screenshot? It is very hard
for me to debug this without a
Korean client in hand.
Original comment by evlogimenos
on 4 Apr 2009 at 5:34
I found a something. I think "LibJSON-1.0" cannot convert from strings to
unicodes. I
Tested a small thing.
1. /run t=GetRealmName();SendChatMessage(t)
-> I got a message "알레리아". That`s korean strings.
2. Convert to unicode string by using LibJSON-1.0.
(I referenced epgp export code. 'function mod:Export()' in log.lua)
/run t={}; t.g=GetRealmName(); local lib=LibStub("LibJSON-1.0");local
json=lib.Serialize(t); SendChatMessage(json)
-> I got unicode strings. '\u354C \u3408 \u35AC \u3544'
wow ace`s homepage(http://www.wowace.com/projects/libjson-1-0/), they said
"UTF-8 strings up to U+FFFF are fully supported." but, i don`t think so.
unicode table 34xx ~ 35xx is not korean, that`s chinese.
(http://jrgraphix.net/research/unicode_blocks.php?block=90)
If that library could convert corretly, I was going to get the message that is
'\uC54C \uB808 \uB9AC \uC544'. that`s so simlar with a previous string, but not
exatly.
Original comment by kalstei...@gmail.com
on 5 Apr 2009 at 2:26
Awesome work. I will follow up with the LibJSON developer to investigate.
Just to make sure about this bug report: the problem is only when you
export/import from EPGPWeb right? That
is the addon itself does not have any problems with Korean.
Original comment by evlogimenos
on 5 Apr 2009 at 2:40
oops, sorry. unicode table is not UTF-8, right? I will calculate that
'\uC54C \uB808 \uB9AC \uC544' convert to UTF-8. I`m not sure when it finish,
cause
I`m not familar with Unicode :).
Original comment by kalstei...@gmail.com
on 5 Apr 2009 at 3:05
Ok I found the bug. Line 158 of LibJSON reads:
buffer[#buffer+1] = ("%04X"):format(nibble1 + nibble2 * 16 + nibble3 * 256 +
nibble4 * 1024)
It should actually read:
buffer[#buffer+1] = ("%04X"):format(nibble1 + nibble2 * 16 + nibble3 * 256 +
nibble4 * 4096)
Please try this and let me know if it works. I am contacting ckknight to fix
LibJSON.
Original comment by evlogimenos
on 5 Apr 2009 at 3:06
Ticket opened for LibJSON-1.0:
http://www.wowace.com/projects/libjson-1-0/tickets/1-bug-in-3-byte-
encoding-of-utf-8/
Original comment by evlogimenos
on 5 Apr 2009 at 3:10
This is fixed in r1149.
Original comment by evlogimenos
on 5 Apr 2009 at 3:38
Thanks. It works so good!!
Original comment by kalstei...@gmail.com
on 5 Apr 2009 at 12:04
Original issue reported on code.google.com by
kalstei...@gmail.com
on 4 Apr 2009 at 5:31