Skip to content

Share ICU culture init for unix/win with validation#46660

Merged
tarekgh merged 1 commit intodotnet:masterfrom
am11:feature/System.Globalization/culture-names-validation
Jan 8, 2021
Merged

Share ICU culture init for unix/win with validation#46660
tarekgh merged 1 commit intodotnet:masterfrom
am11:feature/System.Globalization/culture-names-validation

Conversation

@am11
Copy link
Member

@am11 am11 commented Jan 7, 2021

Fixes #46577

@ghost
Copy link

ghost commented Jan 7, 2021

Tagging subscribers to this area: @tarekgh, @safern, @krwq
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #46577

Author: am11
Assignees: -
Labels:

area-System.Globalization

Milestone: -

@tarekgh
Copy link
Member

tarekgh commented Jan 7, 2021

int32_t GetLocale(const UChar* localeName,

Could you look at all callers of this method to ensure the passed locale name always checked by the managed validation? just in case anyone calling this method in some private way.


Refers to: src/libraries/Native/Unix/System.Globalization.Native/pal_locale.c:30 in 387ce51. [](commit_id = 387ce51fda203b0ab5fbe9e6248489d8cc246f20, deletion_comment = False)

@am11
Copy link
Member Author

am11 commented Jan 7, 2021

Windows leg failures show some difference between 'ICU on Unix' and 'ICU on Windows with Kernel32 call: GetLocaleInfoEx'. I think we can look into skipping the call to GetLocaleInfoEx and unify this code, rather than omitting those cases from the unit-tests.

@am11 am11 changed the title Improve culture name validation on Unix Share ICU culture init for unix/win with validation Jan 7, 2021
@am11 am11 marked this pull request as ready for review January 7, 2021 12:48
Copy link
Member

@tarekgh tarekgh left a comment

Choose a reason for hiding this comment

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

@am11 thanks a lot for your help with that.

Copy link
Member

@safern safern left a comment

Choose a reason for hiding this comment

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

Great, thanks for your help!

@tarekgh tarekgh merged commit 805e288 into dotnet:master Jan 8, 2021
@am11 am11 deleted the feature/System.Globalization/culture-names-validation branch January 8, 2021 18:04
@ghost ghost locked as resolved and limited conversation to collaborators Feb 7, 2021
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.

The CultureInfo named "/" might stall the dotnet process on macOS/Linux

5 participants