[xml] Converting ISO Latin 9 to UTF-8



I expect I'm missing the obvious, but I'm having a problem finding an easy way to convert from ISO Latin 9 
(8859-15) to UTF-8. I have a program with libxml2 embedded (but not iconv, I haven't needed it yet and it's 
easier without it on multiple platforms, including VMS) with an xml document whose original encoding is 
probably UTF-16. I'm currently adding elements and attributes using xmlNodeSetContent and xmlSetProp, with 
the text assumed to be ISO Latin 1 (8859-1) and converted to UTF-8 with a call to isolat1ToUTF8. If in fact 
the text to be added is actually ISO Latin 9 (8859-15), is there an easy way to specify this? I know there is 
a function ISO8859_15ToUTF8 but it seems that it's not intended that this should be called from outside 
libxml2.

Thanks,

Mark

-----------------------------------------
Email provided by http://www.ntlhome.com/





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