Re: [xml] How to display in ASCII encoding and not in UTF8 ?



Aurelien Nephtali wrote:
Hello,

I have a sample XML file:

<?xml version="1.0" encoding="utf-8" ?>
<C>B(Convention collective nationale 1998-07-13 en vigueur &#224; l'extension &\
#233;tendue par arr&#234;t&#233; du 2_avril 1999 JORF 14_avril 1999).<p/>
</C>

Using the sample code reader1.c from the documentation, I got:

0 1 C 0 0
1 3 #text 0 1 B(Convention collective nationale 1998-07-13 en vigueur
à l'extension étendue par arrêté du 2_avril 1999 JORF 14_avril
1999).
1 1 p 1 0
1 14 #text 0 1 
0 15 C 0 0

How to dump data with the encoding "&#;" style ? How to tell libxml2
to not use this encoding (UTF8 I guess ?) ?


I think your locales are iso-8859-1 or iso-8859-15, see UTF8Toisolat1()
in encoding.h

Thanks in advance!



-- 
sickless (dot) org
When the limits are your imagination and the bandwidth.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]