conhost with raster fonts: chcp 65001 breaks rendering of box-drawing characters #21233

Closed
opened 2026-01-31 07:37:15 +00:00 by claunia · 3 comments
Owner

Originally created by @lhecker on GitHub (Feb 10, 2024).

Windows Terminal version

d3a18b9

Windows build number

No response

Other Software

No response

Steps to reproduce

  • Print box-drawing characters
  • chcp 65001 -> It worky :)
  • Ctrl+Scroll -> It no worky :(

Expected Behavior

This behavior is sus and I feel like this may not be a limitation in GDI. The ASCII characters all still work and the font doesn't actually change at all when you Ctrl+Scroll. LOGFONTW has a code-page field and we probably do something wrong there, or the .fon files have some weird logic that makes box-drawing glyphs code-page dependent. 🤔

In any case, we probably shouldn't treat 65001 as any old code page and instead use the CP_ACP instead.

Actual Behavior

image

image

Originally created by @lhecker on GitHub (Feb 10, 2024). ### Windows Terminal version d3a18b9 ### Windows build number _No response_ ### Other Software _No response_ ### Steps to reproduce * Print box-drawing characters * chcp 65001 -> It worky :) * Ctrl+Scroll -> It no worky :( ### Expected Behavior This behavior is sus and I feel like this may not be a limitation in GDI. The ASCII characters all still work and the font doesn't actually change at all when you Ctrl+Scroll. `LOGFONTW` has a code-page field and we probably do something wrong there, _or_ the .fon files have some weird logic that makes box-drawing glyphs code-page dependent. 🤔 In any case, we probably shouldn't treat 65001 as any old code page and instead use the CP_ACP instead. ### Actual Behavior ![image](https://github.com/microsoft/terminal/assets/2256941/e142721a-eb99-42f8-a3ab-3b29f2c7df28) ![image](https://github.com/microsoft/terminal/assets/2256941/f690cb3d-25ad-41ce-a10f-dee1d584fd2d)
claunia added the Product-ConhostArea-RenderingIssue-BugNeeds-Tag-FixPriority-1 labels 2026-01-31 07:37:16 +00:00
Author
Owner

@lhecker commented on GitHub (Feb 15, 2024):

Weird... I can't reproduce this issue on my other machine that uses a public Windows build, even though I'm using the latest conhost from main.

@lhecker commented on GitHub (Feb 15, 2024): Weird... I can't reproduce this issue on my other machine that uses a public Windows build, even though I'm using the latest conhost from `main`.
Author
Owner

@zadjii-msft commented on GitHub (Mar 29, 2024):

Image

Just tried this in the conhost straight off the current GE builds:

chcp 65001
type d:\dev\utf-8-test.txt

then ctrl+scroll, and it worked fine?

@zadjii-msft commented on GitHub (Mar 29, 2024): ![Image](https://github.com/microsoft/terminal/assets/18356694/d0264c1f-ade8-44cf-8706-ec3f8f8c5ed6) Just tried this in the conhost straight off the current GE builds: ``` chcp 65001 type d:\dev\utf-8-test.txt ``` then ctrl+scroll, and it worked fine?
Author
Owner

@lhecker commented on GitHub (Mar 29, 2024):

It only happend with raster fonts. But I can't reproduce it anymore either so I'll close this.

@lhecker commented on GitHub (Mar 29, 2024): It only happend with raster fonts. But I can't reproduce it anymore either so I'll close this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21233