Boost logo

Boost :

Subject: [boost] RFC: interest in Unicode codecs?
From: Cory Nelson (phrosty_at_[hidden])
Date: 2009-02-12 12:42:23


Is there interest in having a Unicode codec library submitted to Boost?

Here is what I have (only tested with GCC 4.3 on Debian, and VC++ 2008):
http://svn.int64.org/viewvc/int64/snips/unicode.hpp

Right now it is pretty simple to use:

transcode<utf8, utf16le>(forwarditerator, forwarditeratorend,
outputiterator, traits [, maximum]);
transcode<wchar_encoding, utf32be>(inputrange, outputrange, traits [, maximum]);

There is also a codecvt facet which supports any-to-any.

Supports UTF-8, UTF-16, and UTF-32, in little or big endian. Has a
special wchar_encoding that maps to UTF-16 or UTF-32 depending on your
platform. A traits class controls error handling.

-- 
Cory Nelson

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk