This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
8.2.2.2 Character encodings http://www.w3.org/TR/html5/parsing.html#character-encodings-0 Supported by the i18n WG. "When a user agent is to use the UTF-16 encoding but no BOM has been found, user agents must default to UTF-16LE." If the HTTP header declares the file to be UTF-16BE, which I believe it can, and in which case a BOM should *not* be used, then I think that this would not be true. If the HTTP header declares the file to be UTF-16, then there must be a BOM, so I assume that this is a recovery mechanism if someone does declare UTF-16 in HTTP but omits the BOM. I'd think that some kind of clarification and perhaps error message would be in order though.
(In reply to comment #0) > 8.2.2.2 Character encodings > http://www.w3.org/TR/html5/parsing.html#character-encodings-0 > > Supported by the i18n WG. > > "When a user agent is to use the UTF-16 encoding but no BOM has been found, > user agents must default to UTF-16LE." > > If the HTTP header declares the file to be UTF-16BE, which I believe it can, > and in which case a BOM should *not* be used, then I think that this would not > be true. Then the user agent isn't to use the UTF-16 encoding but the UTF-16BE encoding. The quoted sentence shouldn't say "UTF-16LE". It should say "little-endian UTF-16", unless the spec intends the reported encoding for the document to change and I'm pretty sure that's not the intention. > If the HTTP header declares the file to be UTF-16, then there must be > a BOM, so I assume that this is a recovery mechanism if someone does declare > UTF-16 in HTTP but omits the BOM. Yes.
(In reply to comment #1) > (In reply to comment #0) > > 8.2.2.2 Character encodings > > http://www.w3.org/TR/html5/parsing.html#character-encodings-0 > > > > Supported by the i18n WG. > > > > "When a user agent is to use the UTF-16 encoding but no BOM has been found, > > user agents must default to UTF-16LE." > > > > If the HTTP header declares the file to be UTF-16BE, which I believe it can, > > and in which case a BOM should *not* be used, then I think that this would not > > be true. > > Then the user agent isn't to use the UTF-16 encoding but the UTF-16BE encoding. > The quoted sentence shouldn't say "UTF-16LE". It should say "little-endian > UTF-16", unless the spec intends the reported encoding for the document to > change and I'm pretty sure that's not the intention. This would definitely make things clearer. I'd also suggest to change "is to use the UTF-16 encoding" at the start of the sentence to something that makes it clearer that this is stuff *labeled* with a label of "UTF-16" (using explicit quotes). > > If the HTTP header declares the file to be UTF-16, then there must be > > a BOM, so I assume that this is a recovery mechanism if someone does declare > > UTF-16 in HTTP but omits the BOM. > > Yes. It may help to make this clear in the text. Regards, Martin.
mass-move component to LC1
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document: http://dev.w3.org/html5/decision-policy/decision-policy.html Status: Accepted Change Description: see diff given below Rationale: Concurred with reporter's comments.
Checked in as WHATWG revision r6498. Check-in comment: Clean up how we refer to UTF-16. http://html5.org/tools/web-apps-tracker?from=6497&to=6498