WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
Bug 54931
Korean is broken by utf8() of String
https://bugs.webkit.org/show_bug.cgi?id=54931
Summary
Korean is broken by utf8() of String
Gyuyoung Kim
Reported
2011-02-21 20:33:58 PST
korean is broken by utf8(). But, korean is not broken when latin1() is used. It seems to me that this is strange. I test this by below codes. printf("<< korean string test(utf8) : %s \n", String("한글").utf8().data()); printf("<< korean string test(latin1) : %s \n", String("한글").latin1().data()); Does anyone know why korean is broken ? If my test is something wrong, please let me know. Thank you.
Attachments
Add attachment
proposed patch, testcase, etc.
Gyuyoung Kim
Comment 1
2011-02-21 20:34:49 PST
Result of above test : korean string test(utf8) : íê¸ korean string test(latin1) : 한글
Gyuyoung Kim
Comment 2
2011-02-21 21:31:57 PST
In order to use utf8, we should use fromUTF8() as below, printf("<< korean string test(utf8) : %s \n", (String::fromUTF8("한글")).utf8().data());
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug