|
Boost : |
From: Phil Endecott (spam_from_boost_dev_at_[hidden])
Date: 2007-09-24 14:53:20
James Porter wrote:
> Instead of defining character types per character set, you could use a
> specialized char_traits class. It contains state_type, which is used
> with codecvt from the I/O stream library. The default typedef for char
> and wchar_t is mbstate_t, which appears in the standard specializations
> for codecvt. (codecvt is used to perform code conversion between
> character types; it's used in wfstream to convert a stream of chars on
> disk to wchar_ts in memory.)
>
> If you change state_type in the char_traits, you'd be able to
> differentiate the various basic_string types and include information
> about the character encoding without writing a whole lot of new code.
Thanks for the suggestion. I need to learn some more about this corner
of "namespace std", clearly, before I go and re-invent something.
Phil.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk