Ignore:
Timestamp:
12/27/14 01:01:43 (9 years ago)
Author:
Maciej Komosinski
Message:

Support for wide char (unicode) names of files and directories under Windows, internally encoded as char* utf-8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/common/stl-util.cpp

    r257 r281  
    77#include <stdlib.h>
    88#include "nonstd_stdio.h"
     9#include "Convert.h"
    910#include "nonstd.h"
    1011#include "framsg.h"
     
    9192#endif
    9293        {
     94#ifdef _WIN32
     95                MFILE *f = mfopen(Convert::utf8ToUtf16(filename).c_str(), Convert::strTOwstr(FOPEN_READ_BINARY).c_str());
     96#else
    9397                MFILE *f = mfopen(filename, FOPEN_READ_BINARY);
     98#endif
    9499                if (f)
    95100                {
     
    119124bool writeCompleteFile(const char* filename, const string& text, bool warn_on_fail)
    120125{
     126#ifdef _WIN32
     127        MFILE *f = mfopen(Convert::utf8ToUtf16(filename).c_str(), Convert::strTOwstr(FOPEN_WRITE_BINARY).c_str());
     128#else
    121129        MFILE *f = mfopen(filename, FOPEN_WRITE_BINARY);
     130#endif
    122131        bool ok = f != NULL;
    123132        if (f)
Note: See TracChangeset for help on using the changeset viewer.