title: Read/Write file with unicode file name with plain C++/Boost
body: <p>I want to read / write a file with a unicode file name using boost filesystem, boost locale on Windows (mingw) (should be platform independent at the end).</p>
  
  <p>This is my code:</p>
  
  <pre><code>#include &lt;boost/locale.hpp&gt;
  #define BOOST_NO_CXX11_SCOPED_ENUMS
  #include &lt;boost/filesystem.hpp&gt;
  #include &lt;boost/filesystem/fstream.hpp&gt;
  namespace fs = boost::filesystem;
  
  #include &lt;string&gt;
  #include &lt;iostream&gt;
  
  int main() {
  
    std::locale::global(boost::locale::generator().generate(""));
    fs::path::imbue(std::locale());
  
    fs::path file("äöü.txt");
    if (!fs::exists(file)) {
      std::cout &lt;&lt; "File does not exist" &lt;&lt; std::endl;
    }
  
    fs::ofstream(file, std::ios_base::app) &lt;&lt; "Test" &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p>The <code>fs::exists</code> really checks for a file with the name <code>äöü.txt</code>. 
  But the written file has the name <code>Ã¤Ã¶Ã¼.txt</code>.</p>
  
  <p>Reading gives the same problem. Using <code>fs::wofstream</code> doesn't help either, since this just handles wide input.</p>
  
  <p>How can I fix this using C++11 and boost?</p>
  
  <p><strong>Edit:</strong> Bug report posted: <a href="https://svn.boost.org/trac/boost/ticket/9968">https://svn.boost.org/trac/boost/ticket/9968</a></p>
  
  <p><strong>To clarify for the bounty:</strong> It is quite simple with Qt, but I would like a cross platform solution using just C++11 and Boost, no Qt and no ICU.</p>