[SDL] SDL_iconv UCS-4 endianness
Christian Walther
cwalther at gmx.ch
Mon Oct 8 02:17:59 PDT 2007
list at akfoerster.de wrote:
> This is undefined. So there is no right or wrong in this case.
OK, good to know. Thanks.
> If you want the "native" encoding for GNU libc,
> use the encoding name "WCHAR_T".
> (I still think it would be a good idea to define "WCHAR_T" also in SDL)
Is that guaranteed to be unicode? I seem to remember something about
"locale-dependent encoding" together with wchar_t, but I may be wrong.
Also, isn't wchar_t 16 bits on Windows (UTF-16 recently, UCS-2 earlier)?
That would make "WCHAR_T" unsuitable for conversion to/from "raw"
unicode code points, which is what I need. (Actually, all I need is to
encode/decode single characters to/from UTF-8, and my current solution
is to just rip the respective parts out of SDL_iconv. Simpler than doing
SDL_iconv_open() etc. every time anyway.)
-Christian
More information about the SDL
mailing list