-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Incorrect CurrentCulture derived from OS in .NET 8 runtime #110095
Comments
I assume it's the same as here: runtime/src/libraries/Common/src/System/Text/EncodingHelper.Unix.cs Lines 21 to 29 in 35e23f7
But I can't find the exact place that does it.
AFAIR .NET only uses a single culture at once, it has no way to use different cultures for different things without you specifying it manually. |
Tagging subscribers to this area: @dotnet/area-system-globalization |
Thanks, I'll have a look.
Yes, I use The |
I'm struggling with incorrect
CurrentCulture
setting coming from the operating system.When preparing the SDK and aspnet images, the required locales are installed and then set via env variables:
This should work so that all the localized values are in the
cs_CZ
locale and only messages (exceptions, dotnet tools messages etc.) are in theen_US
locale. But it doesn't work as expected. Everything is inen_US
locale format (dates, numbers, messages, ...). It's as if thecs_CZ
is not set at all.When I type the
locale
command into the system, it shows:Which seems fine. However, .NET's
CurrentCulture
andCurrentUICulture
both returnen-US
. The only way to change this is to setLC_ALL
tocs_CZ
, but that also changes the language of messages, and of course not only in the .NET application, but also in the tools etc., which I don't want.Why does the .NET 8 not use the
cs_CZ
locale for dates, numbers or anything really?Am I doing something wrong or is this a bug?
How is the
CurrentCulture
determined?Can you point me to some technical documentation or even source code that explains how it's determined from the OS settings?
Thanks in advance.
The text was updated successfully, but these errors were encountered: