Bug 11054

Summary: REGRESSION: Traditional Chinese encoding in login authentication
Product: WebKit Reporter: Leevl <leevl>
Component: Page LoadingAssignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Major CC: ap
Priority: P1 Keywords: Regression
Version: 420+   
Hardware: Mac   
OS: OS X 10.4   
URL: http://www.tianya.cn
Attachments:
Description Flags
proposed fix darin: review+

Description Leevl 2006-09-27 05:04:31 PDT
This simplified Chinese site interprets/encodes one traditional Chinese character of my username unproperly during the login authentication. This character displays correctly in the input field of the login page, but turns scratched on the pop-up  with a warning of "username A??BC doesn't exist".

This bug does not exist in built-in Safari(419.3) and firefox(1.5-2.0b)
Comment 1 Alexey Proskuryakov 2006-09-27 06:44:00 PDT
Could you please tell which character causes this problem?
Comment 2 Leevl 2006-09-28 04:59:48 PDT
(In reply to comment #1)
> Could you please tell which character causes this problem?
> 

¹P£¨pen£©
Comment 3 Alexey Proskuryakov 2006-09-28 07:50:05 PDT
Confirmed, we now encode this character, as if it weren't present in the encoding.

Another (probably related) issue with this page: although it specifies its charset as gb2312 and is rendered correctly by default, it is rendered as garbage in TOT if the charset is set to GB 2312 manually via Text Encoding menu.
Comment 4 Alexey Proskuryakov 2006-10-04 13:54:11 PDT
Created attachment 10915 [details]
proposed fix

This patch fixes both issues; also, we now correctly handle the euro symbol (something that stock Safari doesn't do).

For more information, see: <http://en.wikipedia.org/wiki/GB2312>. I do not know why ICU has such a behavior with GB_2312-80.
Comment 5 Darin Adler 2006-10-05 07:42:40 PDT
Comment on attachment 10915 [details]
proposed fix

I would have done it slightly differently (for example, I don't normally use !strcmp for string equality; I like strcmp == 0 because it has an "==" in it), but this looks good.

r=me
Comment 6 Alexey Proskuryakov 2006-10-05 09:49:02 PDT
Committed revision 16807.

(In reply to comment #5)
> I like strcmp == 0 because it has an "==" in it),

Heh, so do I - but somehow I thought that WebKit style was !strcmp :). Corrected.
Comment 7 Alexey Proskuryakov 2006-10-05 14:02:16 PDT
Reporter, could you please verify that this issue is fixed in the latest nightly build from <http://nightly.webkit.org>?