There is always choice that has to be made if you don't want to support everything, but I personnally feel restricting input to UTF-8 is the easiest of all. Just use plain old std::string
and everyone's happy. In practice, the user (of your library) will only have to convert to UTF-8 if he's on Windows, but there's a plethora of ways to do that simple task.
UPDATE: on the other hand, you could template all of your code and leave the std::basic_string<T>
as a template throughout your code. This only gets messy if you do different things dependent on the size of the template argument.
rubenvb
2010-10-17 17:21:46