Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Fix Rune.ToUpper / ToLower under GlobalizationMode.Invariant #21203

Merged
merged 1 commit into from
Nov 27, 2018

Conversation

GrabYourPitchforks
Copy link
Member

Fixes two bugs:

  1. We inadvertently treat all text as ASCII when GlobalizationMode.Invariant is true, leading to behavior like '×' being converted to '÷' during a lowercase operation.
  2. We forget to check the GlobalizationMode flag when using the ToUpper / ToLower overload that accepts a CultureInfo parameter, leading to a debug assert in TextInfo.ChangeCaseCommon.

See dotnet/corefx#33698 for the corresponding unit tests.

@GrabYourPitchforks
Copy link
Member Author

OSX failure seems to be unrelated to this PR. I'll merge.

@GrabYourPitchforks GrabYourPitchforks merged commit 6af3c5d into dotnet:master Nov 27, 2018
@GrabYourPitchforks GrabYourPitchforks deleted the rune_invariant branch March 11, 2019 06:40
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants