-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
_compareCommandNames should use locale-aware string comparisons #6953
Comments
If there's some STL wstring locale-sensitive compare, I'd index towards that one. Thanks for pointing this out! |
@DHowett - is something like this STL enough?
I am just confused what locale should we use.. just written commands in 3 languages and now wondering what should happen 😄 |
@PankajBhojwani - I can absolutely create a PR, but I am not sure what locale should be used. Is std::locale() good enough? |
I think |
@Don-Vito at this point I want to say it probably is a fine implementation for now, and to go ahead and make the PR for it if you'd like! We can handle potential issues in post |
@PankajBhojwani - great! I am creating one. |
@PankajBhojwani - made it work by explicitly invoking winapi's GetUserDefaultLocaleName. Still need to cleanup the code but please take a look. |
After some additional thought, we're going to try and solve this with #7039 instead. Thanks for all the investigation everyone! |
_compareCommandNames operates on strings that are presented to the end-user, so it should sort like a human, not by codepoint. I'm not sure whether this project prefers
CompareStringEx
orlstrcmp
or some CRT routine.The text was updated successfully, but these errors were encountered: