Skip to content
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

Fix Char.GetUnicodeCategory to returns correct results #41200

Merged
merged 2 commits into from
Aug 24, 2020

Conversation

tarekgh
Copy link
Member

@tarekgh tarekgh commented Aug 22, 2020

Fixes #10990

Details listed in the breaking changes doc.

@ghost
Copy link

ghost commented Aug 22, 2020

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

@tarekgh
Copy link
Member Author

tarekgh commented Aug 22, 2020

CC @danmosemsft @ericstj as this is a candidate for 5.0. Of course I'll fill the template when I open the porting PR in the release branch. This is just FYI for now.

@tarekgh
Copy link
Member Author

tarekgh commented Aug 22, 2020

@safern @GrabYourPitchforks The changes in the test include unrelated fix in time zones. I encountered this failure after getting the new Windows updates which I expect most of the people will run into soon. Also, if we port this fix to 5.0 release branch, it will be good to include this test fix too to avoid the failure there too.

@tarekgh
Copy link
Member Author

tarekgh commented Aug 22, 2020

CC @jkotas @stephentoub as they were recommending doing this fix.

#10990 (comment)
#10990 (comment)

@tarekgh
Copy link
Member Author

tarekgh commented Aug 23, 2020

Thanks @jkotas I have addressed all feedback points you sent.

@tarekgh
Copy link
Member Author

tarekgh commented Aug 24, 2020

The CI failure is unrelated and tracked by #41078

};
foreach (char c in GetTestChars(categories))
Assert.True(char.IsLetter(c.ToString(), 0));
Assert.True(char.IsLetter(c.ToString(), 0), $"'{c}':{(int)c:x4} Is Not Letter");
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for clarifying the error message! :)

@tarekgh tarekgh merged commit 3213403 into dotnet:master Aug 24, 2020
@tarekgh tarekgh deleted the CharCategory branch August 24, 2020 17:45
@tarekgh
Copy link
Member Author

tarekgh commented Aug 24, 2020

/backport to release/5.0

@github-actions
Copy link
Contributor

Started backporting to release/5.0: https://github.com/dotnet/runtime/actions/runs/222421865

@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
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.

Char.GetUnicodeCategory returns wrong category for certain Latin-1 characters
4 participants