RE: [libxml++] Character encoding, UTF-8 and such



> From: Morten Hanssen [mailto:morten hanssen pd politiet no] 
> After reading up on old articles in the mailing list archive, 
> I understand that support for UTF-8 in libxml++ is still to 
> come, and it will not be available after libxml++ 1.0 has 
> been released, am I right?
> 
> Anyway; what I wanted to do is to propose a temporary 
> "solution" while we're waiting for support for an UTF-8 aware 
> string class or whatever. The solution would not require any 
> change to the outside API, and thus should be relatively safe 
> to apply. Ok; suggestion:
> 
> std::string is really a typedef for std::basic_string<char>. 
> When a std::string is passed on from libxml++ to a function 
> in libxml, it's char * representation is just casted to 
> unsigned char *. Would it be terribly wrong to assume that 
> the input in the std::string is always ISO-8859,

No, it's always UTF8. Input and Output. That's simple, and that should work.
You can use glib::ustring with that now if you want.

Murray Cumming
murrayc usa net
www.murrayc.com 




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