-
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
Add CP_UTF8 support to GetConsoleLangId #18565
base: main
Are you sure you want to change the base?
Conversation
Wow, this one is intricate for how simple the code looks |
The only question I really have is "what happens to I fully believe that.... 10 years ago... I didn't think through that it would make sense for UTF-8... which had never really been supported in the past... to return the |
I'll of course test this properly before we merge this, but in theory when this returns the unsupported status, the per-thread locale will remain undefined. In that case FormatMessage is documented to use the user locale. So theoretically it should just use Japanese or whatever, as expected, and just how it behaves in non-East-Asian locales. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't merge this PR yet though. While I do I think it's doing the correct thing, it's not exactly working with netsh yet. (I just started testing it.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you asked for this
The reasons why the console code page has an effect on the default
thread locale on Windows is not noted anywhere. If I had to take a
guess, I'd say it's related to the history of the han unification.
In any case, CP_UTF8 is not a "code page" and so it should not have
an effect on the thread locale either. This issue goes all the way
back to the introduction of CP_UTF8 in XP, over 20 years ago.
Closes MSFT-56188683
Validation Steps Performed
chcp 65001
netsh interface ipv4 show interface
has Japanese table headers ❌