nehtik / epgp

Automatically exported from code.google.com/p/epgp
0 stars 0 forks source link

EPGPWeb cannot support Korean. #378

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.show log
2.export button click
3.text cannot support Korean.

What is the expected output? What do you see instead?

"realm": "\u354c\u3408\u35ac\u3544" that doesn`t look like korean any more.
Does epgp support Unicode?

What version of the product are you using? What locale is your client (en,
ru, kr, ch, es, tw)? What other addons do you have installed and what
versions?

kr. 5.4.1

Paste the text surrounded by -EPGP- in Guild Information here:

If this is about http://epgpweb.appspot.com integration, what is the realm
and region of your guild?
guild name is "SLRCLUB"

Please provide any additional information below.

Original issue reported on code.google.com by kalstei...@gmail.com on 4 Apr 2009 at 5:31

GoogleCodeExporter commented 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

GoogleCodeExporter commented 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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
This is fixed in r1149.

Original comment by evlogimenos on 5 Apr 2009 at 3:38

GoogleCodeExporter commented 8 years ago
Thanks. It works so good!!

Original comment by kalstei...@gmail.com on 5 Apr 2009 at 12:04