-
Notifications
You must be signed in to change notification settings - Fork 6.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
[vcpkg] Set correct locale env variables. #43293
Comments
Given that you only saw this fail inside |
How about we just take your fix #43291 for now, and change the tool if we see more port(s) which do this. Getting localized messages but not breaking digit separators and stuff that other tools tend to depend on seems like a good thing TM. |
To fix tbb #43291 is fully sufficient. This issue is not critical. It is more in the sense to be more definsive against potential edge cases and because the tbb issue was triggered as a combination of tbb and vcpkg both changing only selected env vars. To give the full story: My system default (I think this is Ubuntu default for localized install): Upstream TBB does Now what curretly breaks the vcpkg tbb build is vcpkg setting What I totally missed until now is the context that vcpkg-tool actually sets this at the beginning of its own main function, so probably this locale is meant for vcpkg-tool internal usage where localization is probably wanted and it's just a side effect that this env var bubbles down to cmake configuration of ports. I only looked at it from port perspective that ports should in the best case be build in an exact same state across any machines where localization is just an additional error factor and users do not see that output anyway despide in logfiles. |
vcpkg explicitly sets the env variable
LC_ALL=C.UTF-8
, see here.But a system may also has the env variable
LANGUAGE
set which takes precedence ifLC_ALL
has a value set different thanC
. Therefore, vcpkg may runs with a system default locale which is not the intendedC.UTF-8
. This can lead to problems if ports try to parse any tool output and do not properly handle locales by themself (e.g. #43291).Therefore, vcpkg should probably also handle the
LANGUAGE
env variable in any way. Options:LANGUAGE
LC_ALL=C
(but this will loose UTF-8)References:
(This is a summary of a discussion with @BillyONeal on Discord starting here.)
The text was updated successfully, but these errors were encountered: