diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-11-26 13:07:28 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-11-26 13:07:28 +0000 |
| commit | ba026adb5e3f99aa02ad4c1776be7c39ba223a0b (patch) | |
| tree | 35c342951f33bfa1aa006cdff8f7bf819b1e9421 | |
| parent | 721f53ea97e7125038bd2a4bc55b2cef28300cfd (diff) | |
2010-11-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
For MINGW32 build, percent-encode non-ASCII characters in
filename.
* src/util.cc
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | src/util.cc | 4 |
2 files changed, 9 insertions, 1 deletions
@@ -1,5 +1,11 @@ 2010-11-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> + For MINGW32 build, percent-encode non-ASCII characters in + filename. + * src/util.cc + +2010-11-26 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> + Include last '/' to directory name to create. This will avoid to create directory 'C:' in Windows. * src/File.cc diff --git a/src/util.cc b/src/util.cc index 2f2d272e..ce2fe522 100644 --- a/src/util.cc +++ b/src/util.cc @@ -1393,7 +1393,9 @@ std::string escapePath(const std::string& s) || std::find(vbegin(WIN_INVALID_PATH_CHARS), vend(WIN_INVALID_PATH_CHARS), c) != vend(WIN_INVALID_PATH_CHARS) - + // Since Windows does not understand UTF-8 correctly, we + // percent-encode character other than ASCII. + || c > 0x7fu #endif // __MINGW32__ ){ d += fmt("%%%02X", c); |
