Skip to content

TextInfo.ToTitleCase mishandles Dutch IJ digraph on neutral nl culture #133032

Description

@rjgotten

Description

TextInfo.ToTitleCase mishandles the Dutch IJ digraph with the neutral nl culture.
It only works correctly with specific cultures.

Reproduction Steps

CultureInfo.GetCultureInfo("nl-NL").TextInfo.ToTitleCase("de ijsvogel")
// ✅ "De IJsvogel"
CultureInfo.GetCultureInfo("nl").TextInfo.ToTitleCase("de ijsvogel")
// ⛔ "De Ijsvogel"

Expected behavior

The neutral Dutch culture should capitalize the ij digraph.

Actual behavior

The neutral Dutch culture does not capitalize the ij digraph.

Regression?

No response

Known Workarounds

Only use TextInfo.ToTitleCase with a specific Dutch culture.

Configuration

.NET runtime: v10.0.11

Other information

Source-verifiable cause: TextInfo.ToTitleCase uses a .StartsWith("nl-") check on the TextInfo instance's culture name. That naturally fails for the neutral Dutch culture.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions