Document N2238 has not been relevant since 2007. I'm not sure what Straustrup specifically tells in the interview, but this is not news.
N3242 ยง22.5 still requires codecvt_utf8 and codecvt_utf16 , which you only need for input / output of Unicode files. imbue right side on wcout and should be good to go ... if you have a compatible library. However, in practice, GCC and MSVC already ship UTF-8, and I would expect every serious C ++ platform to maintain parity between mbstowcs and codecvt .
There may be confusion because N3242 ยง22.5 / 5 says
- Multibyte sequences can only be written as a binary file. Attempting to write to a text file creates undefined behavior.
This is due to the fact that text mode input / output converts the end of lines, so byte 0x10 , since half of the 16-bit word UTF-16 can be converted to 0x13, 0x10 , corrupting the stream. This has nothing to do with poor support ... just remember to open the file in binary mode, as in any library that provides this functionality.
source share