Boost logo

Boost :

Subject: Re: [boost] [unicode] provide <boost/cuchar.hpp> header?
From: Artyom Beilis (artyomtnk_at_[hidden])
Date: 2012-02-27 09:15:21

> From: Beman Dawes <bdawes_at_[hidden]> > > 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? > They should be trivially implementable using mbsrtowcstype of functions and boost::locale::conv::utf_to_utf (header only) Also note, the only compiler that actually provides char16_t and char32_t at this point is GCC... So meanwhile they would be quite useless. (No, MSVC10 does not provide them they are typedefs(!) and not real types)   Artyom Beilis -------------- CppCMS - C++ Web Framework: CppDB - C++ SQL Connectivity:

Boost list run by bdawes at, gregod at, cpdaniel at, john at