-
Couldn't load subscription status.
- Fork 5.2k
[browser] Fix HybridGlobalization, SoftHyphen is not ignored when it should be
#105946
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This was referenced Aug 5, 2024
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This was referenced Aug 6, 2024
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
matouskozak
reviewed
Aug 15, 2024
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.
A few small nits but overall LGTM!
src/libraries/Common/tests/TestUtilities/System/PlatformDetection.cs
Outdated
Show resolved
Hide resolved
matouskozak
approved these changes
Aug 15, 2024
mkhamoyan
approved these changes
Aug 15, 2024
This was referenced Aug 15, 2024
Closed
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #95473.
compare/endsWith/startsWithignored only:\u200B (Zero Width Space)\u200C (Zero Width Non-Joiner)\u200D (Zero Width Joiner)\uFEFF (Zero Width No-Break Space)\0 (Null character)With this PR they start ignoring
\u00ADas well.indexOfdid not ignore any of above because that would affect the index count. It turns out that\u00AD(SoftHyphen) does not matter in index count and it's correct to ignore it. Other characters ignored by comparison functions influence the index count.Moving the turkish-i issue from blocking full test to blocking specific test cases that fail
Unblocking the test uncovered another, non related issue:
String.Replaceuses indexing function implementation withmatchLengthparameter. This implementation is not supported byHybridGlobalizationon browser -matchLengthshould throw. This PR changes the expected value for tests that useString.Replaceand adds comment in the docs.We were not throwing
PNSEfor IndexOf implementation withmatchLengthparameter even though we do not calculate it and similar methods,IsPrefixandIsSuffixthrowPNSEby design. Now we start throwing correctly.runtime/docs/design/features/globalization-hybrid-mode.md
Line 271 in 6931b3b
Documentation got updated to reflect the actual state - we throw PNSE when methods with
matchLengthare used.ToDo:
IndexOfwithmatchLengthis used. Make a follow-up PR with it.