diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-12-10 18:52:09 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-12-14 23:49:12 +0200 |
commit | 88756bfe95f539c0658b4ecb4d6547d76affdce4 (patch) | |
tree | ad11fae47bf14a448127f3279be7829a168d6a20 /meson.py | |
parent | 93c988b45384cb141b592995eebeba954bd36cb6 (diff) | |
download | meson-88756bfe95f539c0658b4ecb4d6547d76affdce4.zip meson-88756bfe95f539c0658b4ecb4d6547d76affdce4.tar.gz meson-88756bfe95f539c0658b4ecb4d6547d76affdce4.tar.bz2 |
Print UTF-8 warning only when actually encountering non-ascii filenames.
Diffstat (limited to 'meson.py')
-rwxr-xr-x | meson.py | 11 |
1 files changed, 0 insertions, 11 deletions
@@ -18,17 +18,6 @@ from mesonbuild import mesonmain, mesonlib import sys, os, locale def main(): - # Warn if the locale is not UTF-8. This can cause various unfixable issues - # such as os.stat not being able to decode filenames with unicode in them. - # There is no way to reset both the preferred encoding and the filesystem - # encoding, so we can just warn about it. - e = locale.getpreferredencoding() - if e.upper() != 'UTF-8' and not mesonlib.is_windows(): - print('Warning: You are using {!r} which is not a Unicode-compatible ' - 'locale.'.format(e), file=sys.stderr) - print('You might see errors if you use UTF-8 strings as ' - 'filenames, as strings, or as file contents.', file=sys.stderr) - print('Please switch to a UTF-8 locale for your platform.', file=sys.stderr) # Always resolve the command path so Ninja can find it for regen, tests, etc. launcher = os.path.realpath(sys.argv[0]) return mesonmain.run(sys.argv[1:], launcher) |