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

IgnoreCase has no invariant option #181

Open
mpondo opened this issue Sep 28, 2021 · 1 comment
Open

IgnoreCase has no invariant option #181

mpondo opened this issue Sep 28, 2021 · 1 comment

Comments

@mpondo
Copy link

mpondo commented Sep 28, 2021

The current implementation of IgnoreCase does not include an option for invariant culture.

This caused an issue for us, since some of our users have their Windows regional settings set to Turkish. Turkish has a dotted and a dotless version of the letter "i", which means that using a simple ToLower for the character comparison was not working and the parsing was failing.

To see the issue, set your regional settings to Turkish and run this line of code:
char.ToLower('I') == char.ToLower('i')

For my project, I've created a new method that does the same logic but uses ToLowerInvariant() to resolve the issue.

@mpondo mpondo changed the title IgnoreCase has not invariant option IgnoreCase has no invariant option Sep 28, 2021
@nblumhardt
Copy link
Member

Thanks for the suggestion 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants