[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
wchar_t <--> Unicode Conversion
I'm writing a network server that does a lot of work in UCS-2LE
a.k.a. UnicodeLittle. For reasons of effiency I would like to use an
unsigned short type to represent UCS-2 strings and convert to UTF-8 when
making calls into the system(e.g. fopen) and wchar_t for sophisticated
string manipulation on an as required basis. I'm having a little trouble
converting between UCS-2 and wchar_t and back however. I take it wchar_t
does not have a portable "encoding" like UCS-4 but rather it's own
"encoding"(what?) and therefore I must go through UTF-8; UCS-2 <-->
UTF-8 <--> wchar_t?
Why doesn't wchar_t play nice with Unicode?
Thanks,
Mike
-
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/linux-utf8/