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
Incorrect order with diacritics #34
Comments
Thanks for posting this issue! The reason is that this library compares strings without unicode characters differently than strings with unicode characters:
If an array contains both strings with unicode characters and strings without unicode characters, the sorting is done partly based on the ascii decimal values and partly using This issue made me think about natural sorting of strings. For humans, the strings So the natural order of your examples should be as follows:
From this point of view, strings should generally be compared in a case insensitive manner like |
Thanks for your detailed explanation. It makes sense that the letter case is not important in natural sorting. That's fine with me if the case sensitive option is removed. |
The order is incorrect when the string contains diacritics
The text was updated successfully, but these errors were encountered: