-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[browser] HybridGlobalization allows different hashes for strings that return true
for Equals
#96400
Comments
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsWe do not have a native, locale sensitive algorithm for
The HasCodes in ICU mode and HybridGlobalization mode are produced differently:
Equality function should have the same effect as Possible fix:
|
I think this breaks contract between |
Closing - the PR that was going to introduce this behavior got changed. |
We do not have a native, locale sensitive algorithm for

HybridGlobalization
, that would replace the ICU data. Implementing it manually in JS would slow down hashing mechanism. From this reason, we decided to use Invariant hasing and sort key functions inHybridGlobalization
mode (see: #96354).This approach has a few downsides, including a situation where two strings, e.g. s1 = "igloo", s2 = "İGLOO"
that are equal under "tr-TR" linguistic comparer (ICU or HybridGlobalization), produce:
The HasCodes in ICU mode and HybridGlobalization mode are produced differently:
Equality function should have the same effect as
GetHashCode
comparison, however forHybridGlobalization
this does not stand.There are
HashCodeLocalized
test cases excluded for HG marked with this issue.Possible fix:
HybridGlobalization
off (this will increase the application size by loading additional ICU data)The text was updated successfully, but these errors were encountered: