XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] [Summary] Why is Encoding Metadata (e.g. encoding="UTF-8")put Inside the XML Document?

David Carlisle a écrit :
> There, if there is no external metadata or xml declaration the file has
> to be in utf16 or utf8, and the BOM is optional for utf8, so if the file
> has no BOM, then the parser does not "give up" The file is treated as if
> utf8 is specified.

The BOM has some sense only with 16-bits encoding charsets ; it 
indicates the endianness, that is to say which one of the 2 bytes is 
stored first

If the encoding it specified as UTF-16 without more indications about 
endianness, or not specified at all, the BOM -if present- will state if 
it is UTF-16le or UTF-16be (it seems that if the encoding is specified, 
it is a redundant information)

If the BOM is missing and the encoding not specified, the encoding is 
either UTF-16xx (I don't remember which one is the default :) ) or UTF-8

-- 
Cordialement,

               ///
              (. .)
  --------ooO--(_)--Ooo--------
|      Philippe Poulard       |
  -----------------------------
  http://reflex.gforge.inria.fr/
        Have the RefleX !


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS