|
Boost : |
From: Nils Springob (nils.springob_at_[hidden])
Date: 2006-09-18 10:25:00
What would you think of an iterator based approach with the following
interface:
// Bideirectional iterator for UTF8 / UTF16 coded data
// I: Raw data iterator
// C: Unicode character type
template <class I, typename C> class unicode_iterator;
// I: Unicode character iterator
template <typename I> class unicode_string;
// some standard types:
typedef unicode_iterator<std::string::iterator, wchar_t> utf8_iterator;
typedef unicode_iterator<std::basic_string<short>::iterator, wchar_t>
utf16_iterator;
typedef std::wstring::iterator utf32_iterator;
typedef unicode_string<utf8_iterator> > utf8_string;
typedef unicode_string<utf16_iterator> > utf16_string;
typedef unicode_string<utf32_iterator> > utf32_string;
This would allow a lot of algorithms to work directly together whith a
"slim" unicode framework.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk