-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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][non-icu] HybridGlobalization
checking for prefix/suffix
#85093
Conversation
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: GlobalizationNative_StartsWith, GlobalizationNative_EndsWith New, non-icu private API: Interop.JsGlobalization.StartsWith, Interop.JsGlobalization.EndsWith Affected public API (see: tests in CompareInfoTests.IsPrefix.cs, CompareInfoTests.IsSuffix):
ToDo: paste perf test results here All changes in behavior are listed in docs\design\features\hybrid-globalization.md. cc @SamMonoRT
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@pavelsavara
and wrong (see failures: https://helixre107v0xdcypoyl9e7f.blob.core.windows.net/dotnet-runtime-refs-pull-85093-merge-f3fb5a2097a34532ba/WasmTestOnBrowser-Hybrid.WASM.Tests/1/console.f54019e3.log?helixlogtype=result). From this reason, I am reverting the changes to decoding algorithm. I will use the above loop for every host type. Edit: to check out more testcases that start failing when we use the Encoder see my attempt to use it in comparison in the PR: #85098 |
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: GlobalizationNative_StartsWith, GlobalizationNative_EndsWith New, non-icu private API: Interop.JsGlobalization.StartsWith, Interop.JsGlobalization.EndsWith Affected public API (see: tests in CompareInfoTests.IsPrefix.cs, CompareInfoTests.IsSuffix):
The above are results on the version with TextEncoder. Current version results:
All changes in behavior are listed in docs\design\features\hybrid-globalization.md. cc @SamMonoRT
|
Still LGTM, but I would love this to get explained.
|
I am in the process of #85098 investigation (there the only change is the decoding so it's easier). When I have conculsions, I'll post there and ping you. |
The other PR had a logical error that was not connected with the way TextDecoder works. What is going on here:
65533 -> %uFFFD: Replacement character - used to replace an incoming character whose value is unknown or unrepresentable in Unicode. |
TextEnxcoder is fine, its behavior just does not match NLS's behavior. V8 behaves like Windows's NLS. |
Implements a chunk of web-api based globalization. Is a part of HybridGlobalization feature and contributes to #79989.
Old, icu-based private API: GlobalizationNative_StartsWith, GlobalizationNative_EndsWith
New, non-icu private API: Interop.JsGlobalization.StartsWith, Interop.JsGlobalization.EndsWith
Affected public API (see: tests in CompareInfoTests.IsPrefix.cs, CompareInfoTests.IsSuffix):
It is faster than existing ICU version (that does not support vectorization) but the supported scope is reduced.
All changes in behavior are listed in docs\design\features\hybrid-globalization.md.
cc @SamMonoRT
cc @lewing: weightless chars removal is done by a regex after decoding the string