Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add CP_UTF8 support to GetConsoleLangId#18565

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
lhecker wants to merge1 commit intomain
base:main
Choose a base branch
Loading
fromdev/lhecker/get-lang-id

Conversation

@lhecker
Copy link
Member

@lheckerlhecker commentedFeb 12, 2025
edited
Loading

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.

ClosesMSFT-56188683

Validation Steps Performed

  • Switch OS display language to Japanese
  • Switch user default codepage to Japanese (932)
  • Run the modded OpenConsole
  • chcp 65001
  • netsh interface ipv4 show interface
    has Japanese table headers ❌

ExE-Boss reacted with eyes emoji
@lheckerlhecker added Product-ConhostFor issues in the Console codebase Area-ServerDown in the muck of API call servicing, interprocess communication, eventing, etc. Issue-BugIt either shouldn't be doing this or needs an investigation. zInbox-BugIgnore me! labelsFeb 12, 2025
@DHowett
Copy link
Member

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

@miniksa
Copy link
Member

The only question I really have is "what happens toFormatMessage 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 theSTATUS_NOT_SUPPORTED. But I'm also wondering whetherFormatMessage is now gonna be broken and other less enlightened tools are going to have a really bad time.

nike4949 reacted with thumbs up emoji

@lhecker
Copy link
MemberAuthor

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.

@lheckerlhecker marked this pull request as ready for reviewFebruary 26, 2025 20:01
Copy link
Member

@zadjii-msftzadjii-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I just love1 functions that have 6 paragraphs of comments spanning a decade to understand just how load bearing they are

Footnotes

  1. is love the right word?

@lhecker
Copy link
MemberAuthor

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.)

Copy link
Member

@DHowettDHowett left a 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

nike4949 reacted with rocket emoji
@microsoft-github-policy-servicemicrosoft-github-policy-servicebot added the Needs-Author-FeedbackThe original author of the issue/PR needs to come back and respond to something labelMar 11, 2025
@microsoft-github-policy-servicemicrosoft-github-policy-servicebot added the No-Recent-ActivityThis issue/PR is going stale and may be auto-closed without further activity. labelMar 18, 2025
@lheckerlhecker reopened thisMar 26, 2025
@lheckerlhecker removed Needs-Author-FeedbackThe original author of the issue/PR needs to come back and respond to something No-Recent-ActivityThis issue/PR is going stale and may be auto-closed without further activity. labelsMar 26, 2025
@lheckerlhecker marked this pull request as draftMarch 26, 2025 10:55
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@DHowettDHowettDHowett requested changes

@zadjii-msftzadjii-msftzadjii-msft approved these changes

@miniksaminiksaAwaiting requested review from miniksa

+1 more reviewer

@SiriusmeneSiriusmeneSiriusmene approved these changes

Reviewers whose approvals may not affect merge requirements

Requested changes must be addressed to merge this pull request.

Assignees

No one assigned

Labels

Area-ServerDown in the muck of API call servicing, interprocess communication, eventing, etc.Issue-BugIt either shouldn't be doing this or needs an investigation.Product-ConhostFor issues in the Console codebasezInbox-BugIgnore me!

Projects

Status: To Consider
Status: To Cherry Pick

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

6 participants

@lhecker@DHowett@miniksa@zadjii-msft@Siriusmene

[8]ページ先頭

©2009-2025 Movatter.jp