WSL icon indicating copy to clipboard operation
WSL copied to clipboard

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

Open 0xbadfca11 opened this issue 6 years ago β€’ 12 comments

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

0xbadfca11 avatar Jun 18 '20 13:06 0xbadfca11

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.

therealkenc avatar Jun 18 '20 18:06 therealkenc

There was no improvement using Windows Terminal.

0xbadfca11 avatar Jun 19 '20 03:06 0xbadfca11

I'll sort this out, thanks for reporting.

benhillis avatar Jun 19 '20 04:06 benhillis

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 avatar Jun 20 '20 03:06 licanhua

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.

licanhua avatar Jun 20 '20 04:06 licanhua

  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

0xbadfca11 avatar Jun 20 '20 08:06 0xbadfca11

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

image

licanhua avatar Jun 24 '20 04:06 licanhua

I’ll find some time to fix this today.

benhillis avatar Jun 24 '20 14:06 benhillis

Fixed.

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

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

0xbadfca11 avatar Jul 27 '20 06:07 0xbadfca11

/fixed 20175

therealkenc avatar Oct 06 '20 09:10 therealkenc

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 avatar Oct 06 '20 09:10 ghost

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

mdragosv avatar Nov 30 '22 23:11 mdragosv