Bug 54931
Summary: | Korean is broken by utf8() of String | ||
---|---|---|---|
Product: | WebKit | Reporter: | Gyuyoung Kim <gyuyoung.kim> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | ||
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | PC | ||
OS: | OS X 10.5 |
Gyuyoung Kim
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
Result of above test :
korean string test(utf8) : íê¸
korean string test(latin1) : 한글
Gyuyoung Kim
In order to use utf8, we should use fromUTF8() as below,
printf("<< korean string test(utf8) : %s \n", (String::fromUTF8("한글")).utf8().data());