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.
Description
TextInfo.ToTitleCase mishandles the Dutch IJ digraph with the neutral nl culture.
It only works correctly with specific cultures.
Reproduction Steps
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.ToTitleCasewith a specific Dutch culture.Configuration
.NET runtime: v10.0.11
Other information
Source-verifiable cause:
TextInfo.ToTitleCaseuses a.StartsWith("nl-")check on theTextInfoinstance's culture name. That naturally fails for the neutral Dutch culture.