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

NLS vs ICU difference in invariant case changing of title case characters. #59661

Closed
teo-tsirpanis opened this issue Sep 27, 2021 · 2 comments
Closed
Labels
area-System.Globalization untriaged New issue has not been triaged by the area owner

Comments

@teo-tsirpanis
Copy link
Contributor

Description

When .NET uses the ICU globalization libraries, changing the case of a title case character in the invariant culture works the most intuitive way:

Char.ToUpperInvariant('Dz') == 'DZ';
Char.ToLowerInvariant('Dz') == 'dz';

When using the NLS libraries by setting DOTNET_SYSTEM_GLOBALIZATION_USENLS to true however, the methods don't change the character at all:

Char.ToUpperInvariant('Dz') == 'Dz';
Char.ToLowerInvariant('Dz') == 'Dz';

Configuration

.NET 6, RC 1, Windows 10 21H1

Regression?

No

Other information

Even if it's by design, it should be documented somewhere as another NLS vs ICU difference.

@dotnet-issue-labeler dotnet-issue-labeler bot added area-System.Globalization untriaged New issue has not been triaged by the area owner labels Sep 27, 2021
@ghost
Copy link

ghost commented Sep 27, 2021

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

Issue Details

Description

When .NET uses the ICU globalization libraries, changing the case of a title case character in the invariant culture works the most intuitive way:

Char.ToUpperInvariant('Dz') == 'DZ';
Char.ToLowerInvariant('Dz') == 'dz';

When using the NLS libraries by setting DOTNET_SYSTEM_GLOBALIZATION_USENLS to true however, the methods don't change the character at all:

Char.ToUpperInvariant('Dz') == 'Dz';
Char.ToLowerInvariant('Dz') == 'Dz';

Configuration

.NET 6, RC 1, Windows 10 21H1

Regression?

No

Other information

Even if it's by design, it should be documented somewhere as another NLS vs ICU difference.

Author: teo-tsirpanis
Assignees: -
Labels:

area-System.Globalization, untriaged

Milestone: -

@tarekgh
Copy link
Member

tarekgh commented Sep 27, 2021

@teo-tsirpanis thanks for your report. As you indicated this is by design as switching using ICU is expected to notice differences comparing to NLS. This is the whole point switching to ICU to always get consistent behavior across platforms and conforming with whatever Unicode standard spec.

Even if it's by design, it should be documented somewhere as another NLS vs ICU difference.

I don't think we can list every single difference between NLS and ICU. We already documented the generic breaking change giving some idea what to expect in general. Also, we have the issue #43956 which is listing some of these issues. I'll add a link to this issue there.

@tarekgh tarekgh closed this as completed Sep 27, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Globalization untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

2 participants