Windows Console doesn't support Unicode out of the box #18110

Closed
opened 2026-01-31 06:04:01 +00:00 by claunia · 4 comments
Owner

Originally created by @barrytang on GitHub (Aug 5, 2022).

Description of the new feature/enhancement

This suggestion is originated from https://developercommunity.visualstudio.com.

Right now, Windows Console doesn't support Unicode by default for English OS. To make it work, the app needs to either set output encoding to UTF8 or configure Windows Console properties to UTF8. Even after doing so, some Unicode still won't get rendered correctly because Windows Console doesn't support font-fallback as explained here.

Proposed technical implementation details (optional)

It would be great to enable an out-of-the-box console experience that supports Unicode for customers.

Originally created by @barrytang on GitHub (Aug 5, 2022). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement This [suggestion](https://developercommunity.visualstudio.com/t/%E3%83%87%E3%83%90%E3%83%83%E3%82%B0%E5%AE%9F%E8%A1%8C%E3%81%A7Shift_JIS%E3%81%AB%E3%81%AA%E3%81%84%E6%96%87%E5%AD%97%E3%81%8C%E8%A1%A8%E7%A4%BA%E3%81%95%E3%82%8C%E3%81%BE%E3%81%9B%E3%82%93/10001821#TPIN-N10088478-N10090272) is originated from https://developercommunity.visualstudio.com. Right now, Windows Console doesn't support Unicode by default for English OS. To make it work, the app needs to either set output encoding to UTF8 or configure Windows Console properties to UTF8. Even after doing so, some Unicode still won't get rendered correctly because Windows Console doesn't support font-fallback as explained [here](https://devblogs.microsoft.com/commandline/windows-command-line-unicode-and-utf-8-output-text-buffer/#console-built-in-a-pre-unicode-dawn). <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> # Proposed technical implementation details (optional) It would be great to enable an out-of-the-box console experience that supports Unicode for customers. <!-- A clear and concise description of what you want to happen. -->
claunia added the Issue-FeatureResolution-Duplicate labels 2026-01-31 06:04:01 +00:00
Author
Owner

@237dmitry commented on GitHub (Aug 5, 2022):

I think this is rather OS wide settings

Screenshot 2022-08-05 075031

Screenshot 2022-08-05 110020

@237dmitry commented on GitHub (Aug 5, 2022): I think this is rather OS wide settings ![Screenshot 2022-08-05 075031](https://user-images.githubusercontent.com/78153320/183004029-022ccdf1-10fc-4bba-833c-9981c4dbd317.png) ![Screenshot 2022-08-05 110020](https://user-images.githubusercontent.com/78153320/183031063-26921d77-9593-4260-b4cc-a376fe588834.png)
Author
Owner

@zadjii-msft commented on GitHub (Aug 5, 2022):

Yea, I'm not sure that's something we'll be able to change in any short order. Using the console APIs in a client application to specifically request CP_UTF8 is the best way to do this.

There's a collection of issues here to follow:

  • #1802 might make this better for the Terminal in the future. We can use the Terminal to opt applications in to UTF8 as the default codepage. We'd have a setting within Terminal to opt out of this support. That would alieviate the need to call SetConsole*CP for any apps that are being run in the Terminal.
  • #8000 and #190 are generally tracking any other work to be done to better support the breadth of unicode in the buffer, in input and output.
  • #10478 should have largely mitigated any unicode rendering issues in the vintage console, as far as I'm aware. Conhost will still be subject to issues that would arise from the buffer not supporting full unicode (as tracked above)
    • This PR should be available in SV2 builds of Windows 11 (e.g. >22000.000), but I don't know the first build number it appeared in.

I'm gonna collectively resolve this as a dupe of those conversations. Thanks!
/dup #1802 #8000 #190 #10478

@zadjii-msft commented on GitHub (Aug 5, 2022): Yea, I'm not sure that's something we'll be able to change in any short order. **Using the console APIs in a client application to specifically request CP_UTF8 is the best way to do this**. There's a collection of issues here to follow: * #1802 might make this better for the Terminal in the future. We can use the Terminal to opt applications in to UTF8 as the default codepage. We'd have a setting within Terminal to opt out of this support. That would alieviate the need to call `SetConsole*CP` for any apps that are being run in the Terminal. * #8000 and #190 are generally tracking any other work to be done to better support the breadth of unicode in the buffer, in input and output. * #10478 should have largely mitigated any unicode rendering issues in the vintage console, as far as I'm aware. Conhost will still be subject to issues that would arise from the buffer not supporting full unicode (as tracked above) * This PR should be available in SV2 builds of Windows 11 (e.g. >22000.000), but I don't know the first build number it appeared in. I'm gonna collectively resolve this as a dupe of those conversations. Thanks! /dup #1802 #8000 #190 #10478
Author
Owner

@ghost commented on GitHub (Aug 5, 2022):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Aug 5, 2022): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Author
Owner

@asmichi commented on GitHub (Aug 15, 2022):

Sorry for posting in a closed issue.

Using the console APIs in a client application to specifically request CP_UTF8 is the best way to do this.

I agree and that's the very reason Visual Studio should do so. Therefore the original suggestiion should be reopened -- Visual Studio should have the ability to emulate a chcped console for debug execution.
(It's not normal for the debugee to set the code page since (IMO) console programs should respect the current code page. We normally do chcp.com <codepage> and then run a program when we want the program to obey a specific code page.)

Well, when the world is like "There is only one true console code page -- UTF-8", the problem itself disappears. If that is our direction, yeah, #1802 is it.

@asmichi commented on GitHub (Aug 15, 2022): Sorry for posting in a closed issue. > Using the console APIs in a client application to specifically request CP_UTF8 is the best way to do this. I agree and that's the very reason Visual Studio should do so. Therefore the original [suggestiion](https://developercommunity.visualstudio.com/t/%E3%83%87%E3%83%90%E3%83%83%E3%82%B0%E5%AE%9F%E8%A1%8C%E3%81%A7Shift_JIS%E3%81%AB%E3%81%AA%E3%81%84%E6%96%87%E5%AD%97%E3%81%8C%E8%A1%A8%E7%A4%BA%E3%81%95%E3%82%8C%E3%81%BE%E3%81%9B%E3%82%93/10001821#TPIN-N10088478-N10090272) should be reopened -- Visual Studio should have the ability to emulate a `chcp`ed console for debug execution. (It's not normal for the debugee to set the code page since (IMO) console programs should respect the current code page. We normally do `chcp.com <codepage>` and then run a program when we want the program to obey a specific code page.) Well, when the world is like "There is only one true console code page -- UTF-8", the problem itself disappears. If that is our direction, yeah, #1802 is it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#18110