You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
_compareCommandNames should use locale-aware string comparisons #6953
_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 or lstrcmp or some CRT routine.
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
Activity
DHowett commentedon Jul 16, 2020
If there's some STL wstring locale-sensitive compare, I'd index towards that one. Thanks for pointing this out!
Don-Vito commentedon Oct 15, 2020
Dustin L. Howett (@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 commentedon Oct 16, 2020
Based on what I see here, Don-Vito 's way seems the way to go, would you mind making a PR with the change?
Don-Vito commentedon Oct 16, 2020
PankajBhojwani - I can absolutely create a PR, but I am not sure what locale should be used. Is std::locale() good enough?
PankajBhojwani commentedon Oct 20, 2020
I think
std::locale("")obtains the native locale (source), so that might be what we want actually. Will look into it more and let you know!PankajBhojwani commentedon Oct 22, 2020
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
Don-Vito commentedon Oct 22, 2020
PankajBhojwani - great! I am creating one.
Don-Vito commentedon Oct 23, 2020
PankajBhojwani - made it work by explicitly invoking winapi's GetUserDefaultLocaleName. Still need to cleanup the code but please take a look.
zadjii-msft commentedon Nov 19, 2020
After some additional thought, we're going to try and solve this with #7039 instead. Thanks for all the investigation everyone!