Closed Bug 936440 Opened 11 years ago Closed 11 years ago

Report UTF-16LE or UTF-16BE instead of UTF-16 as the BOM-sniffed encoding

Categories

(Core :: DOM: HTML Parser, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: hsivonen, Assigned: hsivonen)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [qa-])

Attachments

(1 file)

Per Encoding Standard, the document charset should not be magic in the case of BOM-sniffed UTF-16.
The binary patch changes "UTF-16" into "UTF-16BE" as an assertion expectation in a UTF-16BE file.
Attachment #830200 - Flags: review?(VYV03354)
Comment on attachment 830200 [details] [diff] [review]
Stop reporting UTF-16 without LE/BE

Review of attachment 830200 [details] [diff] [review]:
-----------------------------------------------------------------

::: docshell/test/browser/browser_bug234628-5.js
@@ +31,5 @@
>    is(gBrowser.contentDocument.documentElement.textContent.indexOf('\u0402'), 146, "Parent doc should decode as windows-1251 subsequently");
>    is(gBrowser.contentDocument.getElementsByTagName("iframe")[0].contentDocument.documentElement.textContent.indexOf('\u20AC'), 87, "Child doc should decode as utf-16 subsequently");  
>  
>    is(gBrowser.contentDocument.characterSet, "windows-1251", "Parent doc should report windows-1251 subsequently");
> +  is(gBrowser.contentDocument.getElementsByTagName("iframe")[0].contentDocument.characterSet, "UTF-16LE", "Child doc should report UTF-16 subsequently");

"Child doc should report UTF-16LE subsequently"
Attachment #830200 - Flags: review?(VYV03354) → review+
(In reply to Masatoshi Kimura [:emk] from comment #2)
> "Child doc should report UTF-16LE subsequently"

Thanks. Landed with this fixed.
https://hg.mozilla.org/integration/mozilla-inbound/rev/5c028db562c5
https://hg.mozilla.org/mozilla-central/rev/5c028db562c5
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: