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

Output text of wsl.exe before enabling WSL2 are garbled when Windows display language is not English. #5438

Closed
0xbadfca11 opened this issue Jun 18, 2020 · 12 comments

Comments

@0xbadfca11
Copy link

Environment

Microsoft Windows [Version 10.0.20150.1000]
WSL2

Steps to reproduce

Setting app -> Time & Language -> Language -> Set "Windows display language".
Launch wsl.exe.

Translated text is displayed correctly after enabling WSL and rebooting.

Expected behavior

image

Actual behavior

C:\Windows\system32>wsl --help

Copyright (c) Microsoft Corporation. All rights reserved.

????: wsl.exe [Argument]

??:

    --install
        Linux ? Windows ??????????????????????
        ??????????????????? ???????????????????

    --help
        ??????????????

C:\Windows\system32>wsl --install
Installing Virtual Machine Platform
Virtual Machine Platform is now installed.
Installing Windows Subsystem for Linux
Windows Subsystem for Linux is now installed.
???????????????????????????????????????????????

C:\Windows\system32>wsl --install
??????????????????????????

C:\Windows\system32>

image

@therealkenc
Copy link
Collaborator

Maybe variation your #5388 (and one other I can't find atm). I was meaning to ask over in the other one: is it any better in windows terminal.

@0xbadfca11
Copy link
Author

There was no improvement using Windows Terminal.

@benhillis benhillis self-assigned this Jun 19, 2020
@benhillis benhillis added the bug label Jun 19, 2020
@benhillis
Copy link
Member

I'll sort this out, thanks for reporting.

@0xbadfca11 0xbadfca11 changed the title Output text of wsl.exe before enabling WSL2 are garbled when Windows display language is not English.. Output text of wsl.exe before enabling WSL2 are garbled when Windows display language is not English. Jun 19, 2020
@licanhua
Copy link
Collaborator

licanhua commented Jun 20, 2020

I hit this too, it's related to codepage. You may run chcp in cmd.exe to see what's the active code page, and the codepage is not the localized one.

There are two ways to fix it:

  1. use Windows Terminal. Windows Terminal fixed this problem.
  2. There is 'Change system locale' in Region setting, change it and make it matches with Windows display language

The traditional windows console host is very susceptible to changes in codepage and font. It doesn’t do font fallback, so it will replace glyphs that do not exist in the current font with the [?] symbol.

@licanhua
Copy link
Collaborator

Maybe variation your #5388 (and one other I can't find atm). I was meaning to ask over in the other one: is it any better in windows terminal.

They are different problems. 5388 is WSL code problem, and you can't workaround it without code change. And this issue is not a bug and you should be able to fix it by settings.

@0xbadfca11
Copy link
Author

  1. Windows Terminal does not solves this problem.
    image

  2. Of course, if I have a fresh install of Windows, Windows display language and system locale match.
    image

@licanhua
Copy link
Collaborator

Thanks, I can repro your problem.
It only happens before enabling WSL. After you enabled WSL, it will display message correctly.

image

@benhillis
Copy link
Member

I’ll find some time to fix this today.

@0xbadfca11
Copy link
Author

0xbadfca11 commented Jul 27, 2020

Fixed.

  • Ensure error messages are always printed in the correct codepage.

https://docs.microsoft.com/en-us/windows/wsl/release-notes#build-20175

@therealkenc
Copy link
Collaborator

/fixed 20175

@ghost ghost added the fixedininsiderbuilds label Oct 6, 2020
@ghost
Copy link

ghost commented Oct 6, 2020

This bug or feature request originally submitted has been addressed in whole or in part. Related or ongoing bug or feature gaps should be opened as a new issue submission if one does not already exist.

Thank you!

@ghost ghost removed the fixinbound label Oct 6, 2020
@mdragosv
Copy link

mdragosv commented Nov 30, 2022

Before wsl --install

image

after wsl --install

image

WSL store looks like french or something

image

why the hell do i get french language ???

found a fix, this happends when you use the terminal to do a wsl --install, if you installit from additional components in windows everything is ok, until you do a wsl --update and it updates to this freaking french language

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants