In a nutshell... in my app we use boost::filesystem::path
a whole lot. It mostly works very well, EXCEPT if somebody decides to be cute and refer to a non-unicode filename in windows (say, for some reason I cannot fathom, somebody has a Shift-JIS filename).
As the say, ignorance is bliss and in mine, I thought I might be able to get around this by doing something along the lines of (Does this even make sense BTW?):
namespace fs = boost::filesystem;
class utf8Path : public fs::path {
public:
utf8Path () : fs::path () {};
utf8Path (std::string path) : fs::path(UnicodeUtil::convertToUTF8(path)) {};
}
Of course, I wasn't taking into account all the various assignment and such operators.
Supposing what I wrote above makes sense and is not broken code... is it possible to extend this approach to other versions of the constructor, assignment operators and such?