Uh oh!
There was an error while loading. Please reload this page.
[browser][non-icu] HybridGlobalization SortKey - #84621
Conversation
ghost
commented
Apr 11, 2023
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsImplements a chunk of web-api based globalization. Is a part of HybridGlobalization feature and contributes to #79989. Old, icu-based private API: New, non-icu private API: none, Web API does not expose SortKey. We throw PlatformNotSupportedException. Affected public API (see: tests in CompareInfoTests.cs):
All changes in behavior are listed in docs\design\features\hybrid-globalization.md This PR also refactors CompareInfo tests - it moves common properties/fields to cc @SamMonoRT
|
ghost
commented
Apr 11, 2023
Tagging subscribers to this area: @dotnet/area-system-globalization Issue DetailsImplements a chunk of web-api based globalization. Is a part of HybridGlobalization feature and contributes to #79989. Old, icu-based private API: New, non-icu private API: none, Web API does not expose SortKey. We throw PlatformNotSupportedException. Affected public API (see: tests in CompareInfoTests.cs):
All changes in behavior are listed in docs\design\features\hybrid-globalization.md This PR also refactors CompareInfo tests - it moves common properties/fields to cc @SamMonoRT
|
pavelsavara
commented
Apr 12, 2023
What are the size wins ? |
ilonatommy
commented
Apr 12, 2023
Size win: Use-cases (only of changes from this PR, not the whole collation):
|
pavelsavara
commented
Apr 12, 2023
Thanks
I mean what are the use-cases where those APIs are useful ? This is what I tried https://github.com/search?q=CompareInfo.GetSortKey+lang%3AC%23+&type=code&p=3 Would it be better if we provide bitwise/invariant sortkey instead of PNSE ? Just an idea. |
ilonatommy
commented
Apr 12, 2023
Sorry, I did not get it. It seems you are right, mostly DBs.
It is not a bad idea but I think if we make it a rule for all locales, it could be confusing. User that calls e.g.
I will stash this idea in the tracking issue in case there is a demand on the above case. |
pavelsavara
left a comment
There was a problem hiding this comment.
LGMT
What is our plan for Android/iOS where maybe Hybrid could support these methods ?
| public int LCID => CultureInfo.GetCultureInfo(Name).LCID; | ||
| #if TARGET_BROWSER | ||
| private static string GetPNSEText(string funcName) => $"{funcName} is not supported when HybridGlobalization=true. Disable it to load larger ICU bundle, then use this option."; |
There was a problem hiding this comment.
Should this be in resource file and localized ?
There was a problem hiding this comment.
Good idea, I can see all exception text in PrivateCoreLib are stored like this, so you are right.
ilonatommy
commented
Apr 17, 2023
Android might have an invariant equivalent, it's dedicated for LDAP sorting: https://docs.oracle.com/javase/7/docs/api/javax/naming/ldap/SortKey.html. I do not see any culture-related SortKey. |
Implements a chunk of web-api based globalization. Is a part of HybridGlobalization feature and contributes to #79989.
Old, icu-based private API:
GlobalizationNative_GetSortKeyNew, non-icu private API: none, Web API does not expose SortKey. We throw PlatformNotSupportedException.
Affected public API (see: tests in CompareInfoTests.cs):
All changes in behavior are listed in docs\design\features\hybrid-globalization.md
This PR also refactors CompareInfo tests - it moves common properties/fields to
CompareInfoTestsBase.cc @SamMonoRT