question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`dotnet publish` shows garbled characters when running on PMC on OS with Traditional Chinese language

See original GitHub issue

Bug transferred from VS Feedback

Describe the bug

A clear and concise description of what the bug is.

This issue has been moved from a ticket on Developer Community.


程序包管理器控制台主机版本 6.4.0.111 乱码

dotnet publish 命令乱码

2022-11-16 22 08 50.png


Original Comments

Feedback Bot on 11/16/2022, 06:37 PM:

(private comment, text removed)

Feedback Bot on 11/17/2022, 00:07 PM:

(private comment, text removed)


Original Solutions

(no solutions)

To Reproduce

  1. Set Windows language to Traiditional Chinese
  2. Set Visual Studio Language to same as OS system.
  3. Create a New Console project
  4. Open Package Manager Console in the recently created Console App
  5. Run “dotnet publish” in Package Manager Console.

Exceptions (if any)

image

Further technical details

  • Include the output of dotnet --info
  • The IDE (VS / VS Code/ VS4Mac) you’re running on, and its version

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
nagilsoncommented, Jan 5, 2023

Hi @LeaFrock, here is a workaround for now:

image

The difference is that PMC is a powershell console, to change chcp in powershell console you need not only to run chcp but to run the following:

$OutputEncoding = [System.Text.Encoding]::UTF8
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
chcp 65001
1reaction
nagilsoncommented, Jan 6, 2023

Thanks for reporting back, glad to hear it worked. 😄 Now let’s hope that the fix I wrote works without breaking any legacy scenarios.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Loc]With .NET 7 Preview 3 SDK zip installed on local OS ...
[Loc]With .NET 7 Preview 3 SDK zip installed on local OS, some garbled characters appear when installing wasm-tools for the first time #24757....
Read more >
The WebService published to Windows Server 2019 IIS ...
When the WebService reads these text data, traditional Chinese will be displayed as garbled code. Internet Information Services.
Read more >
C# localization not working in Chinese OS but ...
I have an application which uses resource files to localize text. The EXE is in a separate project and resources are in separate...
Read more >
Messy Chinese character display at Visual Studio 2019
I got messy displaying some Traditional Chinese characters inside CPP codes, which has no display issue at Notepad++.
Read more >
Untitled
#is 100 emoji png, Ecuador language translator, Dimensions of a mini workbench! Images that represent culture, Christian louboutin sneakers?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found