Re: [xml] UTF8 to MacRoman

Hi Stefano

I would recommend to use libiconv explicitly. It supports lots of
encodings, also MACROMAN. The libiconv interface is straight forward and
it can be used easily to convert UTF-8 to MACROMAN.

Based on my experience on some Unix systems:
Make sure that you use the real libiconv functions and not the ones
provided by the OS. The OS typically supports less encodings. This is
also true if you want libxml2 to use the libiconv explicitly for input
decoding (MACROMAN to UTF-8). libxml2 provides iconv support but you
have to make sure that the right iconv() functions are invoked at
runtime. If you write your own conversion code, I suggest to use the
libiconv/libiconv_open/libiconv_close functions instead of

libiconv can be found here:

Best regards

-----Original Message-----
From: xml-bounces gnome org [mailto:xml-bounces gnome org] On 
Behalf Of Marchese Stefano
Sent: Donnerstag, 22. Juni 2006 09:26
To: xml gnome org
Subject: [xml] UTF8 to MacRoman

... hi everybody,

I need help to print out a XML UTF-8 file in MacOS X.
I do not find an API to do it directly.

Now I am using UTF8Toisolat1() and the I write my own 
convertion table to go from ISOLAT-1 to MacRoman encoding. 
But this is not a good way to do it because I am loosing 
characters like this ' or like this * because they do not 
exist in the ISOLAT-1 encoding.

I wonder if anybody could point me to right direction to 
write the right code to do it.

Thanks in advance for helping me.

-- Stefano
xml mailing list, project page
xml gnome org

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