Support Unicode in paths
I am using log in Windows, and when the path contains a special space (hex code 0xc2a0), the log file cannot be created correctly."
Your path contains the Unicode character U+00A0 in terms of a UTF-8 code point. AFAIK Windows does not support UTF-8 encoding for path specification in general. If this is still true, such a path would be indeed invalid.
For non-English countries, it's very common that the path contains Unicode. I have checked the source code and found that the _open function cannot work correctly. Replacing it with _wopen may be a good choice.
Replacing ANSI function variants by their Unicode counterparts is not sufficient. The path handling in environment variables, flags etc. must also be completely reworked.
Support Unicode in paths https://github.com/google/glog/pull/998
Thanks! #786 seems to be related.
Thanks! #786 seems to be related.
The solution from #786 cannot resolve this question. it works if I set FLAGS_log_dir to a unicode path,but It cannot work when the path contains the Unicode character 0xc2a0. for example: log dir