
Den 31-01-2012 20:51, Ion Gaztañaga skrev:
El 31/01/2012 11:05, Thorsten Ottosen escribió:
I don't see any particular reason for supporting wide strings, neither in Boost.Filesystem or Interprocess. If everything was in "utf8-mode", we can just use std:::string. Of course, both libraries needs to do custom stuff under the hood (e.g. converting to utf16 on windows before calling the windows api).
I'm really ignorant on encoding and unicode issues, but I guess windows users don't expect "char *" or std::string to be utf-8 encoded.
Well, its just a matter of stating the contract of your code. If you state that the string or const char* argument is assumed to be utf8, then your're done. This is a better contract than "I assume nothing, and guarantee nothing". Alternatively, you can accept a boost::filesystem::path object, if you can live with that dependency. Then you have pushed the problem to the caller. -Thorsten