Skip to content

CultureName "c" and "C" get mapped to Invariant Culture #114328

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

Merged
merged 1 commit into from
Apr 9, 2025

Conversation

adamsitnik
Copy link
Member

Fuzzer has helped me to learn one more thing about culture name mappings:

if (cultureName.Length == 1 && (cultureName[0] == 'C' || cultureName[0] == 'c'))
{
// Always map the "C" locale to Invariant to avoid mapping it to en_US_POSIX on Linux because POSIX
// locale collation doesn't support case insensitive comparisons.
// We do the same mapping on Windows for the sake of consistency.
return Invariant;
}

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-reflection-metadata
See info in area-owners.md if you want to be subscribed.

@adamsitnik
Copy link
Member Author

@MihuBot fuzz AssemblyNameInfo

@adamsitnik
Copy link
Member Author

/ba-g the built has started two days ago and have not finished, it's unrelated

@adamsitnik adamsitnik merged commit 0e94dca into dotnet:main Apr 9, 2025
83 of 88 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators May 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants