I'm currently developing a cross-platform C++ library which I intend to be Unicode aware. I currently have compile-time support for either std::string or std::wstring via typedefs and macros. The disadvantage with this approach is that it forces you to use macros like L("string") and to make heavy use of templates based on character type.
What are the arguments for and against to support std::wstring only?
Would using std::wstring exclusively hinder the GNU/Linux user base, where UTF-8 encoding is preferred?
strclass is unicode, and there's a newbytesclass to hold sequences of bytes, and provide string-like manipulation (substring search and so on). But they can only be interpreted as text by conversion with an encoding. So, if someone is planning, "data that only contains 7-bit values", they can save memory by using "bytes", but their objects are not compatible with proper strings. The awkward issue I see with this in C++ is the same one you already have with wstring, that you have to convert literals, and for calls to functions likefopen. - Steve Jessop