Well, my point is precisely that this class does _not_ work everywhere. In an OS with a Unicode file system I cannot use the boost::filesystem library to represent a path to a Unicode directory. If the characters in the name of the directory are in the current locale then it is possible to use the name but if I am using an English locale and the name of the directory is in Japanese then I cannot point boost::filesystem to it using an ANSI string. However this is not the main problem. The main problem arrives with iteration. There is even a point in the boost::filesystem documentation that says an open issue with the library is what happens when a Unicode file is found during directory iteration. As you can understand, if I cannot retrieve the names of all the files in the directory when the directory is iterated then the library is not working for me. If the library would attempt to convert the name to ANSI and I am not running the right locale then the conversion would produce garbage. So what I ask is a library that works everywhere, just like you say. I understand your point about POSIX file systems but since the library is compiled for Windows _or_ for POSIX systems I think it would be possible to compile for single char strings or double byte strings (UTF16). Windows systems solve this problem with the concept of TCHAR, a type that is defined as a char or wchar_t depending on a preprocessor definition. Then, boost::fylesystem::path could accept std::basic_string<TCHAR> instead of std::basic_string<char>. That would solve the problem and everybody would be happy ;) Thanks -delfin -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Vladimir Prus Sent: Wednesday, June 30, 2004 12:44 AM To: boost-users@lists.boost.org Subject: [Boost-users] Re: Feature request for boost::filesystem Keith MacDonald wrote:
I decided not to use boost::filesystem, because it does not support Unicode. There's a thread in the archives about it, explaining that Unicode was ignored, because it was specific to Windows, and this is intended to be a portable library. However, I think the developers have missed the point that the Windows file system uses Unicode natively, so boost::filesystem is not really portable to it. A more useful solution, in my opinion, would be one that allowed the user to choose which char type to use, like boost::regex.
And what would POSIX system to with basic_path