W3C home > Mailing lists > Public > public-html@w3.org > July 2010

Re: Polyglot Markup/XML encoding declaration

From: Jirka Kosek <jirka@kosek.cz>
Date: Thu, 29 Jul 2010 15:43:44 +0200
Message-ID: <4C518590.2090801@kosek.cz>
To: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
CC: Henri Sivonen <hsivonen@iki.fi>, HTMLwg <public-html@w3.org>, Eliot Graff <eliotgra@microsoft.com>, public-i18n-core@w3.org
Leif Halvard Silli wrote:

> E.g. a typical polyglot - UTF-8 encoded, that is - could start like 
> this:
> 
> ]]
> <?xml version="1.0" ?>
> <!DOCTYPE html>
> <head>
>   <meta charset="UTF-8"/>
> [[

XML declaration is optional if document is encoded in UTF-8/16. So why
to use it at all -- it will just cause troubles to UAs parsing this
stuff with HTML parser.

				Jirka

-- 
------------------------------------------------------------------
  Jirka Kosek      e-mail: jirka@kosek.cz      http://xmlguru.cz
------------------------------------------------------------------
       Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
------------------------------------------------------------------


Received on Thursday, 29 July 2010 13:44:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:17:10 GMT