
On 02/27/2012 02:59 PM, Beman Dawes wrote:
The C++11 standard library provides a header<cuchar>, with a bit of Unicode support, based on C's<uchar.h>:
Macros: __STDC_UTF_16__, __STDC_UTF_32__
Functions: mbrtoc16, c16rtomb, mbrtoc32, c32rtomb
The functions provide conversion between char sequences and UTF-16/UTF-32.
It would be useful to have a<boost/cuchar.hpp> header so that these functions could be used with existing compilers and standard libraries.
Does anyone have an implementation of these functions they would be willing to contribute?
In the C version of the header, it provides the following typedefs: typedef _Char32_t char32_t; typedef _Char16_t char16_t; It could be useful to use that header to provide the char32_t types if they don't exist. The problem is that in C++, char32_t is a keyword, so you can't have boost::char32_t. It can either be ::char32_t or boost::char32.