Article View: news.software.readers
Article #233256UTF-8 encoding issues [Was: Michael .. is as backwards as his U.S. ASCII newsReader.]
From: Xavier Roche
Date: Thu, 21 May 2009 09:43
Date: Thu, 21 May 2009 09:43
35 lines
3200 bytes
3200 bytes
_@Jeff_Relf.Seattle.inValid a écrit :
> Unix-like systems have a magic number at the start of a file.
> U-FeFF is the magic number for plain-text Unicode.
This is not related to Unix systems, but to the Unicode standard. The
reserved character's FEFF main purpose is to detect the endianness
within an UCS2/UCS4 text flow. However its use with the UTF-8
representation is not recommended ("Use of a BOM is neither required nor
recommended for UTF-8, but may be encountered in contexts where UTF-8
data is converted from other encoding forms that use a BOM or where the
BOM is used as a UTF-8 signature")
And the BOM has never been designed for magical encoding detection --
the only safe was to specify the text encoding is through standard MIME
content-type field (and its associated charset attribute)
> I don't care about newsReaders that ignore the MIME-specified charSet.
> Michael Moroney is as backwards as his U.S. ASCII newsReader.
The issue with headers (RFC 2822) is that they do not have any "charset"
and are supposed to be ascii (7-bit) only. The content-type advertises
information (including charset) about the content, but you can not
assume that, if the content-type is of main type "text", the then the
default header's encoding follows the one optionally specified by the
content-type. (this would be a problem for UCS2 transformation, for example)
However, RFC 2047 standardizes an extension to allow non-ascii Unicode
characters in headers (subject, ..), allowing both encoding and
content-encoding to be specified (these are the "=?iso-8859-1?q?" things
you may see with old mail/news readers)
But I'm not sure that this extension is widely accepted on Usenet nor
considered part of the standard.
Technical Details
Message-ID:
<gv37p8$9e4$1@news.httrack.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-sci.physics.(1199963).mbox.7z!not-for-mailReferences:
<gv1e9i$90c$1@pcls4.std.com> <_@Jeff_Relf.Seattle.2009_May20.11.04am.p9> <gv1mhj$vbi$1@pcls6.std.com> <_@Jeff_Relf.Seattle.2009_May20.2.05pm.7Y> <gv21nn$tcq$1@pcls4.std.com> <20090520192807.14195919@bellgrove.remarqs.net> <_@Jeff_Relf.Seattle.2009_May21.2.07am.k1>Show Full Headers
Complete Article Headers
Message-ID: <gv37p8$9e4$1@news.httrack.net> Subject: UTF-8 encoding issues [Was: Michael .. is as backwards as his U.S. ASCII newsReader.] Date: Thu, 21 May 2009 11:43:57 +0200 From: Xavier Roche <xroche@free.fr.NOSPAM.invalid> References: <gv1e9i$90c$1@pcls4.std.com> <_@Jeff_Relf.Seattle.2009_May20.11.04am.p9> <gv1mhj$vbi$1@pcls6.std.com> <_@Jeff_Relf.Seattle.2009_May20.2.05pm.7Y> <gv21nn$tcq$1@pcls4.std.com> <20090520192807.14195919@bellgrove.remarqs.net> <_@Jeff_Relf.Seattle.2009_May21.2.07am.k1> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-sci.physics.(1199963).mbox.7z!not-for-mail Newsgroups: sci.physics,news.software.readers Supersedes: <gv37n9$sbf$2@news.httrack.net> Followup-To: news.software.readers Organization: Nowhere Corp. Lines: 33 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: news.httrack.net 1242899048 9668 192.168.1.1 (21 May 2009 09:44:08 GMT) X-Complaints-To: usenet@httrack.com NNTP-Posting-Date: Thu, 21 May 2009 09:44:08 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; fr-FR; rv:1.8.1.13) Gecko/20080313 SeaMonkey/1.1.9 In-Reply-To: <_@Jeff_Relf.Seattle.2009_May21.2.07am.k1>