![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: UTF-8 & Unicode [Thread Next] Re: UTF-8 & UnicodeTo: NULL Date: 2/3/2005 11:22:00 AM Alan J. Flavell wrote:
> On Wed, 2 Feb 2005, EU citizen wrote:
>
>
>>The need for the XML encoding statement to match the original file
>>format was not mentioned in any of the (many) articles I've read on
>>XM:/XHTML over the last *four* years.
>
>
> The XML coding has to comply with the relevant bit of the XML
> specification. Whether you read it "over the last four years" or not.
> http://www.w3.org/TR/REC-xml/#charencoding
>
> Talking about the "original file format" could be misleading, bearing
> in mind that some HTTP servers are set up to transcode the
> internally-stored file format into one that's more appropriate for use
> on the web. For XML-based markups, that may call for appropriate
> rewriting of the document's XML encoding specification. And if you're
> using XHTML/1.0 Appendix C then the transcoded document would need to
> confirm to its constraints too.
>
RFC3023 talk about XML media types
i retain that text/xml (and text/and-others-related-to-xml) should be
avoid on behalf of application/xml (and
application/and-others-related-to-xml)
Here we get utf-8:
Content-type: text/xml; charset="utf-8"
<?xml version="1.0" encoding="utf-8"?>
!?!?! Here we get US-ACII, despite the encoding specified:
Content-type: text/xml
<?xml version="1.0" encoding="utf-8"?>
Here we get utf-16:
Content-type: application/xml; charset="utf-16"
{BOM}<?xml version="1.0" encoding="utf-16"?>
Here we get the right encoding-known-by-your-parser:
Content-type: application/xml
<?xml version="1.0" encoding="encoding-known-by-your-parser"?>
--
Cordialement,
///
(. .)
-----ooO--(_)--Ooo-----
| Philippe Poulard |
-----------------------
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
