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
iconv/iconv_open/iconv_close.
libiconv can be found here:
http://www.gnu.
org/software/libiconv/
Best regards
Cyrill
> -----Original Message-----
> From: xml-bounces gnome.org [mailto ml-bo
unces 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 http://xmlsoft.org/
> xml gnome.org
> http://mai
l.gnome.org/mailman/listinfo/xml
>
_______________________________________________
xml mailing list, project page http://xmlsoft.org/
xml gnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
|