Re: [xml] Issue with UTF8Toisolat1

2017-04-21 Thread Liam R. E. Quin
On Thu, 2017-04-20 at 09:20 +, Stéphane Michaut wrote:
> 
> [...]

> try to read an XML file which contains properly UTF-8 formatted
> character from French accented character ( for 'È').
> Since I used isolat1ToUTF8 to write this character to xml file, I
> though I simply have to use UTF8Toisolat1 when reading the file in
> order to retrieve my French character 'È'.
> 
> But it doesn't work well : I am getting a \310 char when I display
> the string out of  UTF8Toisolat1 (all non special characters are well
> retrieved yet).

310 (octal) is the ISO 8859-1 code point for an E with grave accent, so
this is correct.

How are you printing it or inspecting the result to see \310 instead of
È?

Liam


-- 
Liam R. E. Quin 

___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


[xml] Issue with UTF8Toisolat1

2017-04-21 Thread Stéphane Michaut
Hi,

I try to read an XML file which contains properly UTF-8 formatted character 
from French accented character ( for 'È').
Since I used isolat1ToUTF8 to write this character to xml file, I though I 
simply have to use UTF8Toisolat1 when reading the file in order to retrieve my 
French character 'È'.

But it doesn't work well : I am getting a \310 char when I display the string 
out of  UTF8Toisolat1 (all non special characters are well retrieved yet).

I read the XML file using
  xmlTextReaderPrt reader = xmlReaderForFile(szXMLFileName, "UTF-8", 0);

and parsing it with
  nRetLect = xmlTextReaderRead(reader);

Since the internal encoding in Libxml is UTF8, all I have to do is to convert 
what I get from the reader in ISO-8859-1 and that's it!
Am should do something wrong, but what ? (Libxml version 2.6.7 on AIX)

Any help appreciated,

Stéphane
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml