The new C++11 standard mentions a header <cuchar>
, presumably in analogy to C99's <uchar.h>
.
Now, we know that C++11 brings new character types and literals that are specifically designed for UTF16 and UTF32, but I didn't think the language would actually contain functions to convert the (system-dependent) narrow multibyte encoding to one of the Unicode encodings. However, I just came across the header synopsis for <cuchar>
that mentions functions mbrtoc16
/c16rtombr
and mbrtoc32
/c32rtombr
that seem to do just that.
Unfortunately, the standard says nothing about those functions beyond the header synopsis. Where are those functions defined, what do they really do and where can I read more about them? Does this mean that one can use proper Unicode entirely with standard C++ now, without the need for any extra libraries?