Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: UTF-8 & Unicode

From: Philippe Poulard <Philippe.PoulardNO@----------.-----.-->
To: 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    |
  -----------------------


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent