Skip to content

Fix Creating Cultures with Sort Names #63386

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 5 commits into from
Jan 7, 2022

Conversation

tarekgh
Copy link
Member

@tarekgh tarekgh commented Jan 5, 2022

Fixes #62929

Unicode defines a notion of how can specify the sorting name inside the culture name. It does that using the term u-co. For example, zh-TW-u-co-zhuyin meant to be the zh-TW culture with sort behavior of zhuyin. Such a name will be resolved to zh-TW@collation=zhuyin in ICU.
Names with u-co used to work fine in .NET 5.0 when running on Windows but was failing on other platforms like Linux. So, this seems a regression but was not perfect anyway in .NET 5.0 either. The change here is to allow such culture names to work in all platforms and behave as expected too, especially when sort names are specified.

@ghost ghost assigned tarekgh Jan 5, 2022
@ghost
Copy link

ghost commented Jan 5, 2022

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

Issue Details

Fixes #62929

Unicode defines a notion of how can specify the sorting name inside the culture name. It does that using the term u-co. For example, zh-TW-u-co-zhuyin meant to be the zh-TW culture with sort behavior of zhuyin. Such a name will be resolved to zh-TW@collation=zhuyin in ICU.
Names with u-co used to work fine in .NET 5.0 when running on Windows but was failing on other platforms like Linux. So, this seen as a regression but was not perfect on .NET 5.0 either. The change here is to allow such culture names to work in all platforms and behave as expected too, especially when sort names are specified.

Author: tarekgh
Assignees: -
Labels:

area-System.Globalization

Milestone: -

@tarekgh tarekgh requested a review from safern January 5, 2022 03:47
@tarekgh tarekgh added this to the 7.0.0 milestone Jan 5, 2022
tarekgh and others added 3 commits January 5, 2022 09:25
…CultureData.Icu.cs

Co-authored-by: kasperk81 <83082615+kasperk81@users.noreply.github.com>
@tarekgh tarekgh merged commit e210a60 into dotnet:main Jan 7, 2022
@tarekgh tarekgh deleted the FixCreatingCulturesWithSortNames branch January 7, 2022 18:36
@ghost ghost locked as resolved and limited conversation to collaborators Feb 6, 2022
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.

CultureNotFoundException in Net6 but works in Net5 on same system
4 participants