Boost C++ Libraries: Ticket #3088: Support of std::wstring versions of boost::iostreams::basic_file::open() https://svn.boost.org/trac10/ticket/3088 <p> It would be quite usefull to have support for files with unicode filenames. i.e. </p> <p> boost::iostreams::file f( L"Japanese characters" ); </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3088 Trac 1.4.3 anonymous Tue, 09 Jun 2009 22:34:52 GMT <link>https://svn.boost.org/trac10/ticket/3088#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3088#comment:1</guid> <description> <p> Agreed... On Windows with msvc 2008, we end up doing something like: </p> <pre class="wiki">wchar_t wideFile = L"example.txt"; // file we want to open with boost std::string fileName; // first call gets buffer size int bufSize = ::WideCharToMultiByte(CP_ACP, 0, wideFile, -1, NULL, 0, NULL, NULL); fileName.resize (bufSize); // second call converts the filename int iRet = ::WideCharToMultiByte(CP_ACP, 0, wideFile, -1, &amp;fileName.at(0), bufSize, NULL, NULL); boost::iostreams::file_sink(fileName.c_str(), ...) </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Wed, 24 Jun 2009 12:45:15 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/3088#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3088#comment:2</guid> <description> <p> The code snipped anbove only works if all the characters in the filename are available in CP_ACP, which is not the case for most japanese characters in the usual 850 codepage. A native support of std::wstring would be much better if the implementation of the STL supports std::basic_fstream(const wchar_t *_Filename...) </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Steven Watanabe</dc:creator> <pubDate>Thu, 17 Jun 2010 13:42:18 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/3088#comment:3 https://svn.boost.org/trac10/ticket/3088#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">wontfix</span> </li> </ul> <p> Since file_sink relies on std::streambuf which doesn't support wide character open, this is not feasible. file_descriptor, however, does handle wide paths (via boost::filesystem::path). </p> Ticket