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

Add CP_UTF8 support to GetConsoleLangId #18565

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

lhecker
Copy link
Member

@lhecker lhecker commented Feb 12, 2025

For discussion!
Relevant context, if you're curious (search for "dragons"): MSFT-56188683

@lhecker lhecker added Product-Conhost For issues in the Console codebase Area-Server Down in the muck of API call servicing, interprocess communication, eventing, etc. Issue-Bug It either shouldn't be doing this or needs an investigation. zInbox-Bug Ignore me! labels Feb 12, 2025
@lhecker lhecker requested review from DHowett and miniksa February 12, 2025 12:57
@DHowett
Copy link
Member

DHowett commented Feb 12, 2025

Wow, this one is intricate for how simple the code looks

@miniksa
Copy link
Member

miniksa commented Feb 12, 2025

The only question I really have is "what happens to FormatMessage calls inside a client process on the other end when you return this?"

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 STATUS_NOT_SUPPORTED. But I'm also wondering whether FormatMessage is now gonna be broken and other less enlightened tools are going to have a really bad time.

@lhecker
Copy link
Member Author

lhecker commented Feb 12, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Server Down in the muck of API call servicing, interprocess communication, eventing, etc. Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Conhost For issues in the Console codebase zInbox-Bug Ignore me!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants