Skip to content

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

Closed

Description

@teo-tsirpanis

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.

Activity

  1. ghost added
    untriaged
    on Sep 27, 2021
  2. tarekgh commented on Sep 27, 2021

    @tarekgh
    Member

    @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.

  3. ghost locked as resolved and limited conversation to collaborators on Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Globalizationuntriaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions