
Can I write:
boost::filesystem::fstream
f("שלום.txt",std::ios_base::out);
When "שלום.txt" is UTF-8 string and Unicode file
name will be created?
If so, way to go.
In v3, yes.
Are you sure about this? How the file will be open? Can you explain what is the path the UTF-8 string passes till the Win32API system call or standard library call? C++ standard defines open only with "char const *" Quoting latest C++ standard draft (section 27.7 std::basic_streambuf) // 27.9.1.4 Members: bool is_open() const; basic_filebuf<charT,traits>* open(const char* s, ios_base::openmode mode); basic_filebuf<charT,traits>* open(const string& s, ios_base::openmode mode); basic_filebuf<charT,traits>* close(); And this it is defined on GCC's libstdc++. As I can see you use std::basic_filebuf for implementing boost::filesystem::basic_fstream. So how do you open "Wide" path or "UTF-8" path using these functions? - Standard library does not accept "wchar_t const *" as parameter to open (with exception of MSVC specific extension) - Windows API does not support UTF-8 codepage. So how do you deal with it? --------------- In the small library I had written I actually implement the basic_filebuf over stdio, and use CRTL Win32 API _wfopen function to open files with Unicode filenames. I hadn't seen anything like that in boost::filesystem::v3 So do I miss something? Artyom