Bug 18277 - incorrectly encoded form submission with utf-16
Summary: incorrectly encoded form submission with utf-16
Status: RESOLVED DUPLICATE of bug 21635
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-02 06:20 PDT by Simon Hausmann
Modified: 2009-04-02 02:00 PDT (History)
2 users (show)

See Also:


Attachments
utf-16 encoded html testcase (482 bytes, text/html)
2008-04-02 06:21 PDT, Simon Hausmann
no flags Details
automated test case (1.95 KB, text/html)
2008-04-03 07:04 PDT, Alexey Proskuryakov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Hausmann 2008-04-02 06:20:27 PDT
The attached html file is encoded in utf-16. Loading it in Safari and pressing the submit button produces a bad query.

Both parameters and values are truncated to one character.

We traced part of the problem down to fixLineBreaks in FormDataList.cpp, which operates in this case on a utf-16 encoded CString and uses zero-termination for determining the end of the string instead of using the length() property of the CString.

This may solve the problem only partly, it could be that other code has the same problem.
Comment 1 Simon Hausmann 2008-04-02 06:21:19 PDT
Created attachment 20290 [details]
utf-16 encoded html testcase
Comment 2 Alexey Proskuryakov 2008-04-03 07:04:27 PDT
Created attachment 20312 [details]
automated test case
Comment 3 Alexey Proskuryakov 2009-04-02 02:00:46 PDT
This was fixed in bug 21635 - we now replace UTF-16 with UTF-8 for form submission. So, my attached automated test still fails, but that's ok.

*** This bug has been marked as a duplicate of 21635 ***