[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?
- From: "Pete Cordell" <petexmldev@tech-know-ware.com>
- To: "Costello, Roger L." <costello@mitre.org>
- Date: Thu, 20 Sep 2007 13:43:10 +0100
Hi Roger,
One small observation on your web page summary...
I don't think the UTF-8 text in the HTML charset declaration should have
quotes around it (or rather the left quote around it shouldn't be there).
e.g.:
<meta http-equiv="Content-Type" content="text/html; Charset="UTF-8" />
should be:
<meta http-equiv="Content-Type" content="text/html; Charset=UTF-8" />
Otherwise the value of the content attribute becomes malformed even by
HTML's standards!
Also, this text is not quite right:
"These are all ASCII characters. Thus, an XML parser opens the document,
interprets
the bit strings as ASCII characters up to the first ">" character. From
then on, it interprets
the rest of the document using the encoding it finds in the XML
declaration."
Your section on the algorithm is closer to the mark. Basically, it uses the
algorithm to guess the encoding. For example, given the example you show it
would assume UTF-8. It would then read on, and when it interpreted the
encoding attribute could switch to ASCII, ISO-8859-*, shift-JIS and so on as
appropriate.
HTH,
Pete.
--
=============================================
Pete Cordell
Codalogic
for XML Schema to C++ data binding visit
http://www.codalogic.com/lmx/
=============================================
----- Original Message -----
From: "Costello, Roger L." <costello@mitre.org>
To: <xml-dev@lists.xml.org>
Sent: Thursday, September 20, 2007 1:05 PM
Subject: [xml-dev] [Summary] Why is Encoding Metadata (e.g.
encoding="UTF-8") put Inside the XML Document?
Hi Folks,
As always, outstanding comments! Thanks!
I have incorporated your comments. Please let me know if I am missing
anything, or have incorrectly interpreted your comments:
http://www.xfront.com/specifying-encoding/
I am particularly interested in hearing if you agree with the
recommendations that I list.
/Roger
_______________________________________________________________________
XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.
[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]