[RFC 0/2] C++11 codecvt specializations.

Tom Tromey tromey@redhat.com
Mon Apr 28 14:49:00 GMT 2014


>>>>> "Rüdiger" == Rüdiger Sonderfeld <ruediger@c-plusplus.de> writes:

Rüdiger> I'm also not sure how to treat wchar_t.  Is it defined for
Rüdiger> libstdc++ to be generally UCS4 (UTF-32)?  Or does libstdc++
Rüdiger> also support legacy systems where wchar_t is only UCS2?

FWIW, wchar_t isn't guaranteed to be either of these.  IIRC for gdb we
found out that there are systems that use their own special encoding, I
think Solaris.

Also, some implementations of iconv cannot convert to or from the
wchar_t encoding; though I imagine you can work around this with
appropriate template specializations to use the <wchar.h> stuff.

IMNSHO the whole area is kind of a crazy mess.  In gdb we ended up
punting on some scenarios for less-than-sane hosts and/or targets; but
gdb's needs are somewhat unusual.

Tom



More information about the Libstdc++ mailing list