Trying to handle character encoding on Windows in multi-platform programs is a nightmare. In C++ you can almost always get away with treating C strings as UTF-8 for input&#x2F;output and you only need special consideration for the encoding if you want to do language-based tasks like converting to lowercase or measuring the &quot;display width&quot; of a string. Not on Windows. Whether or not you define the magical UNICODE macro, Windows will fail to open UTF-8 encoded filenames using standard C library functions. You have to use non-standard wchar overloads or use the Windows API. That is to say, <i>there is no standard-conformant internationalization-friendly way to open a file by name on Windows in C or C++</i>. I really wish Microsoft would at least support UTF-8, even if they want to stick with UTF-16 internally.<p>The section titled &quot;How to do text on Windows&quot; on <a href="http:&#x2F;&#x2F;utf8everywhere.org&#x2F;#windows" rel="nofollow">http:&#x2F;&#x2F;utf8everywhere.org&#x2F;#windows</a> covers the insanity in more detail.