
31 Mar
2006
31 Mar
'06
8:28 a.m.
Chris Pirazzi wrote :
And of course it is possible today to store UTF-16 data in a std::wstring
Not really. std::wstring can only be used for UCS-2 or UCS-4/UTF-32. (UCS-2 is UTF-16 without surrogate pairs, limiting the range of representable Unicode characters to 0-65535)
ICU is probably sufficient, but I thought it might be nice to use something that fits in with the rest of boost and STL more nicely.
Have you tried Glib::ustring from glibmm ? It is an utf-8 implementation with the same interface as std::string. It should work with STL algorithms and the like.