Re: multibyte characters
On 2007-11-16 13:48:08 -0500, Andreas Dehmel
<blackhole.8.zarquon42@spamgourmet.com> said:
On Fri, 16 Nov 2007 08:24:37 -0500, Pete Becker wrote:
On 2007-11-16 05:50:47 -0500, James Kanze <james.kanze@gmail.com> said:
typedef uint32_t UTF32Char ;
In the future this won't be necessary. The next C++ standard will
provide char16_t and char32_t, and appropriate specializations of
std::string, for UTF-16- and UTF-32-encoded characters.
Let's hope the next standard will also provide comprehensive transcoding
functionality between arbitrary encodings -- as part of the standard (lib)
I mean, not as part of another library -- because without that any string
types/classes it defines will be almost completely useless. And let's
also hope the new file-IO interface will understand these classes as well,
otherwise ditto.
There's no new file-IO interface under discussion. As for the current
one, basic_fstream, it already deals with codecvt facets, and that's
the mechanism for translating between character encodings. There are
some new convenience classes for common conversions (see
www.versatilecoding.com for a quick overview), and there will be
builtin codecvt facets for a few common conversions in support of
Unicode.
--
Pete
Roundhouse Consulting, Ltd. (www.versatilecoding.com) Author of "The
Standard C++ Library Extensions: a Tutorial and Reference
(www.petebecker.com/tr1book)