Re: How do xml parsers handle encoding?
- From: Martin Honnen <mahotrash@xxxxxxxx>
- Date: Wed, 30 Apr 2008 16:20:11 +0200
Martin Honnen wrote:
And XML parsers are required to check that documents are properly encoded. However browser like Firefox or Opera I think might not report any such violation. For instance I saved an XML document as UTF-8 but with an XML declaration saying encoding="UTF-16" and then loaded with Firefox 2.0 and Opera 9 and they both did not report an error, instead treated the document as UTF-8. IE 6 reported an error.
For Mozilla, the FAQ http://developer.mozilla.org/en/docs/Mozilla_Web_Developer_FAQ#How_is_the_treatment_of_application.2Fxhtml.2Bxml_documents_different_from_the_treatment_of_text.2Fhtml_documents.3F says:
"Most well-formedness constraints are enforced. (Currently Mozilla does not catch character encoding errors, because the document is re-encoded using a lenient encoding converter before the document reaches the XML parser. This is a bug.)"
--
Martin Honnen
http://JavaScript.FAQTs.com/
.
- Follow-Ups:
- Re: How do xml parsers handle encoding?
- From: billsahiker
- Re: How do xml parsers handle encoding?
- References:
- How do xml parsers handle encoding?
- From: billsahiker
- Re: How do xml parsers handle encoding?
- From: Martin Honnen
- How do xml parsers handle encoding?
- Prev by Date: Re: How do xml parsers handle encoding?
- Next by Date: Re: How do xml parsers handle encoding?
- Previous by thread: Re: How do xml parsers handle encoding?
- Next by thread: Re: How do xml parsers handle encoding?
- Index(es):
Relevant Pages
|