This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [RFC 0/2] C++11 codecvt specializations.
- From: Tom Tromey <tromey at redhat dot com>
- To: RÃdiger Sonderfeld <ruediger at c-plusplus dot de>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Mon, 28 Apr 2014 08:49:23 -0600
- Subject: Re: [RFC 0/2] C++11 codecvt specializations.
- Authentication-results: sourceware.org; auth=none
- References: <1640346 dot JHYN4fB8ph at descartes>
>>>>> "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