diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-08-04 21:43:02 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-08-04 21:43:02 +0900 |
| commit | 3879da592d689d551778b710c21c8a95d2874ab3 (patch) | |
| tree | 121df06eeb860738ff2c5b6abd3c89fb8b09db7b /src/option_processing.cc | |
| parent | 45686860e1b5e94bfa8fa95603f101cce53ed4b1 (diff) | |
In MinGW32, open file with UNICODE filename and print them in ANSI.
Diffstat (limited to 'src/option_processing.cc')
| -rw-r--r-- | src/option_processing.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/option_processing.cc b/src/option_processing.cc index 4fad4465..f4894f80 100644 --- a/src/option_processing.cc +++ b/src/option_processing.cc @@ -170,6 +170,14 @@ void option_processing(Option& op, std::vector<std::string>& uris, cmdstream.seekg(0, std::ios::beg); // finaly let's parse and store command-iine options. oparser.parse(op, cmdstream); +#ifdef __MINGW32__ + for(std::map<std::string, std::string>::iterator i = op.begin(); + i != op.end(); ++i) { + if(!util::isUtf8((*i).second)) { + (*i).second = nativeToUtf8((*i).second); + } + } +#endif // __MINGW32__ } catch(OptionHandlerException& e) { std::cerr << e.stackTrace() << "\n"; SharedHandle<OptionHandler> h = oparser.findByName(e.getOptionName()); |
