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: Jonathan Wakely <jwakely at redhat dot com>
- To: Rüdiger Sonderfeld <ruediger at c-plusplus dot de>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Fri, 25 Apr 2014 23:19:37 +0100
- Subject: Re: [RFC 0/2] C++11 codecvt specializations.
- Authentication-results: sourceware.org; auth=none
- References: <1640346 dot JHYN4fB8ph at descartes>
On 25/04/14 23:44 +0200, Rüdiger Sonderfeld wrote:
Hello,
I started implementing a patch to add the codecvt specializations required by
the C++11 standard (22.4.1.4.3/Table 81 [locale.codecvt]) and the standard
code conversion facets (22.5 [locale.stdcvt]).
Excellent, I have implementations of std::wstring_convert and
std::wbuffer_convert that I have not been able to test without the new
codecvt specializations.
The implementation requires some code to convert between UTF-32, UTF-8,
UTF-16. I couldn't find any code for it in libstdc++.
There is <ext/codecvt_specializations.h>
I looked into gnulib
but it seems the conversion is done through iconv. Which might not be the
best choice if the codecs are known in advance. I had some existing code for
such a conversion which I adopted and added in the patch.
I was assuming we would just use iconv.
I'll review the rest when I get a chance.