Re: Encoding

Elliotte Rusty Harold <[email protected]>
Newsgroups gmane.text.xml.xmlpull.devel
Message-ID <p04330102b9def920464c@[192.168.254.4]>
At 1:28 PM +0200 10/25/02, Stefan Haustein wrote:

>this is possible only if an XML declaration is given,
>since there is no way to ask a Reader for the encoding.
>

Actually, this isn't possible even if the encoding declaration is 
present because the encoding of the original document is not 
guaranteed to match the one specified by the encoding declaration. In 
the presence of external metadata such as found in an HTTP 
Content-type header, the encoding of the metadata takes precedence 
over the encoding of the XML declaration, and as you note, the Reader 
doesn't tell you what it's using.
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | [email protected] | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|          XML in a  Nutshell, 2nd Edition (O'Reilly, 2002)          |
|              http://www.cafeconleche.org/books/xian2/              |
|  http://www.amazon.com/exec/obidos/ISBN%3D0596002920/cafeaulaitA/  |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |
+----------------------------------+---------------------------------+

------------------------ Yahoo! Groups Sponsor ---------------------~-->
4 DVDs Free +s&p Join Now
http://us.click.yahoo.com/pt6YBB/NXiEAA/jd3IAA/2U_rlB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[email protected]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.