dotnet / dotnet/dotnet-api-docs
Clarify culture-sensitive casing behavior (Turkish locale example)
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
### Type of issue
Missing information
### Description
The documentation for String.ToLower() mentions that the method is culture-sensitive and recommends ToLowerInvariant() for identifiers and logic.
However, it does not explicitly mention a common failure case: the Turkish (tr-TR) locale, where casing of 'I' and 'i' differs (e.g., 'I' → 'ı', 'i' → 'İ'), which frequently breaks identifier and key logic for developers who assume English-style casing.
Would it be possible to add a short, explicit warning or example mentioning the Turkish locale as a known pitfall, and to more clearly recommend ToLowerInvariant() / ToUpperInvariant() for identifiers, keys, save data, and logic?
This would help prevent a class of subtle bugs that are otherwise hard to diagnose.
### Page URL
https://learn.microsoft.com/en-us/dotnet/api/system.string.tolower?view=net-9.0&utm_source=chatgpt.com
### Content source URL
https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System/String.xml
### Document Version Independent Id
a94afa8d-b686-a491-fa1d-346d47b50d7c
### Platform Id
385b807c-b74a-a839-79bf-c02f51e5b285
### Article author
@dotnet-bot
Contributor guide
Assessment
This issue has not been assessed yet.