aboutsummaryrefslogtreecommitdiff
path: root/meson.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2017-12-10 18:52:09 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2017-12-14 23:49:12 +0200
commit88756bfe95f539c0658b4ecb4d6547d76affdce4 (patch)
treead11fae47bf14a448127f3279be7829a168d6a20 /meson.py
parent93c988b45384cb141b592995eebeba954bd36cb6 (diff)
downloadmeson-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-xmeson.py11
1 files changed, 0 insertions, 11 deletions
diff --git a/meson.py b/meson.py
index 57cc6dc..13bc870 100755
--- a/meson.py
+++ b/meson.py
@@ -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)