-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warnings and errors when not run from a UTF-8 locale #2268
Comments
Duplicating information here from the Debian bug on this: maybe Debian should change the default package build locale to UTF-8 instead. Having it set to plain ansi is a bit stupid since UTF-8 has been the default user locale for 10+ years already. |
But if it's possible for meson to take care of that detail itself, shouldn't it? |
In the latter case it is not really possible. The system has explicitly specified that it is an ANSI environment but then Meson encounters non-ascii characters from the output of a command it executes. Our design goals have stated that in case of ambiguity fail immediately and loudly as it is better than potential silent data corruption. Python 3.7 will eventually do the policy decision of turning ANSI into UTF-8. Once that happens Meson will inherit it automatically. We don't want to do this choice by ourselves because experience has shown that trying to be clever with locales breaks things silently and makes people sad (especially me, because in the end I'm the one who has to debug said issues). |
For reference, the initial Debian bug is 873831 |
There is no need to do anything clever with locales, Meson just shouldn't use the locale in places where the encoding does not depend on the locale.
|
So this is fixed on python 3.7+, which most places now have, and we're not touching this otherwise, right? |
Due meson error: WARNING: You are using 'ANSI_X3.4-1968' which is not a a Unicode-compatible locale. WARNING: You might see errors if you use UTF-8 strings as filenames, as strings, or as file contents. WARNING: Please switch to a UTF-8 locale for your platform. Link: mesonbuild/meson#2268 Signed-off-by: Petr Vorel <pvorel@suse.cz>
Due meson error: WARNING: You are using 'ANSI_X3.4-1968' which is not a a Unicode-compatible locale. WARNING: You might see errors if you use UTF-8 strings as filenames, as strings, or as file contents. WARNING: Please switch to a UTF-8 locale for your platform. Link: mesonbuild/meson#2268 Signed-off-by: Petr Vorel <pvorel@suse.cz>
meson 0.42.0-2
Debian unstable
meson is emitting warnings when building projects on Debian's infrastructure.
Excerpt from nautilus 3.25.91-1
Fatal error when building geocode-glib 3.25.4.1-1
Suggestion
An earlier issue here suggested that meson should coerce a UTF-8 locale.
The text was updated successfully, but these errors were encountered: