Re: Request for Volunteers: Polyglot spec

On 2010-04-22 01:14, Sam Ruby wrote:
> On 04/21/2010 06:15 PM, Eliot Graff wrote:
>> Today, I uploaded an EARLY draft version of a polyglot spec,
>> "HTML/XHTML Compatibility Authoring Guidelines." [1]
>
> A few QUICK comments:
>
>> If a polyglot document uses an encoding other than UTF8 or UTF16
>
> UTF-16 is not valid for HTML5. I would recommend being more
> prescriptive: simply recomment (or even require) utf-8 as it is the only
> encoding guaranteed to be supported by all HTML and XML parsers.

No, UTF-16 is perfectly acceptable for HTML, although generally UTF-8 is 
preferred.  But if you are using it, then you should include the BOM 
indicating UTF-16LE or BE, and should not include the meta charset 
declaration, which would be redundant as the parser would need to know 
it's reading UTF-16 in order to parse it anyway.

-- 
Lachlan Hunt - Opera Software
http://lachy.id.au/
http://www.opera.com/

Received on Thursday, 22 April 2010 08:59:18 UTC