RE: UTF-16 and MIME text/*

Hi Chris,

I hope you meant to say, XML which is encoded in UTF-16 should
not be served as "text/xml".  XML which is encoded in UTF-8 is
perfectly safe to serve as "text/xml" and SHOULD be.

Oddly, RFC 3023 (XML Media Types) actually discusses using
"text/xml" with UTF-16 encoding ONLY over HTTP transport
(how this could be safe for the receiver AFTER the resource
is moved by HTTP transport is not explained in RFC 3023).

Cheers,
- Ira McDonald

-----Original Message-----
From: Chris Lilley [mailto:chris@w3.org]
Sent: Thursday, June 07, 2001 2:27 PM
To: John Cowan
Cc: Bjoern Hoehrmann; www-international@w3.org; phoffman@imc.org
Subject: Re: UTF-16 and MIME text/*




John Cowan wrote:
> 
> Bjoern Hoehrmann scripsit:
> 
> >    RFC 2871 registers all UTF-16 charsets (UTF-16BE, UTF-16LE and
> > UTF-16) as not suitable for use in MIME content types under the
> > "text" top-level type. Why?
> 
> Because a MIME processor, when encountering something of type text/*,
> is allowed to assume that any 0x0A byte means "LF" and any 0x0D byte means
"CR",
> and to transmute them to some other kind of line ending.  UTF-16
> of whatever flavor violates this rule.

And thus, xml should never be served as text/xml ....

-- 
Chris

Received on Friday, 8 June 2001 15:54:35 UTC