4

Why does the C++ standard mandate support for wstring in the I/O library and the regex library, but it does not mandate support for u8string, u16string and u32string in those libraries?

I asked a similar question eight years ago (Using char16_t and char32_t in I/O), and the answer then was that the Library Working Group "is committed to full support of Unicode, but does not intend to duplicate the library with Unicode character variants of existing library facilities."

Is this still the situation? Do we still have to look to Boost and other library providers to get better Unicode support?

oz1cz
  • 5,504
  • 6
  • 38
  • 58
  • 2
    There has been a proposal [P0169R0](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0169r0.html) to support regex with Unicode character types. Not sure of its current status. – P.W May 21 '19 at 09:37
  • The problem is that Unicode is not stable: it keeps to add characters, so a program could produce different behaviour according to the version know by the compiler/library. IO is transparent with UTF-8 (or bytes), but for the rest: we may have new whitespace characters, which could break codes. – Giacomo Catenazzi May 21 '19 at 15:06

0 Answers0