On Thu, Oct 8, 2015 at 10:03 AM, Peter Dimov <lists@pdimov.com> wrote:
Artyom Beilis wrote:
We can create a "Separate" codecvt library with its own formal review and
it would be ready in best case in a year...
One option is to put it into utility;
+1
another is to use a mini-review if the new codecvt library is an implementation of the standard <codecvt> interface.
+1 It seems pretty useless to me if it isn't an implementation of the standard <codecvt> interface.
std::codecvt_utf8 is not quite the same as boost::utf8_codecvt_facet, but on the other hand, from your previous message it seems that your utf8_codecvt_facet is not std::codecvt_utf8 but std::codecvt_utf8_utf16, or perhaps it's the latter when wchar_t is 16 bit and the former when it's 32 bit.
I'm assuming Artyom is proposing implementing codecvt<wchar_t,char,mbstate_t> where externT is always UTF-8 encoding, and internT encoding is UTF-32 for 32-bit wchar_t (e.g. many POSIX-like systems), UTF-16 for 16-bit wchar_t (e.g. many Windows-like system), and UTF-8 for 8-bit wchar_t (e.g. some embedded systems). --Beman