Conhost doesn't honour the codepage stored in shortcuts #19479

Open
opened 2026-01-31 06:44:39 +00:00 by claunia · 0 comments
Owner

Originally created by @bzzrak on GitHub (Mar 2, 2023).

Windows Terminal version

n/a

Windows build number

10.0.22621.1344

Other Software

cmd.exe

Steps to reproduce

  1. make a shortcut to a CLI program that specifies a code page in it. Link to documentation regarding this
    Or use this one I made:
    cmd-869.zip, for the sake of example I picked code page 869 (Greek), but it can be any code page.

  2. open the shortcut and type "chcp" to check current code page.

Expected Behavior

"chcp" returns the code page in the shortcut.
This is the behaviour if "legacy console mode" is on. (sorry I can't make the text bigger :D)
image

Actual Behavior

The default system code page is returned, the code page in the shortcut has no effect.
I tried setting the system code page to something other than 65001 and it still occurs, so utf-8 is not the issue here.
image

Originally created by @bzzrak on GitHub (Mar 2, 2023). ### Windows Terminal version n/a ### Windows build number 10.0.22621.1344 ### Other Software cmd.exe ### Steps to reproduce 1. make a shortcut to a CLI program that specifies a code page in it. [Link to documentation regarding this](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-shllink/b959e24d-67c7-4409-b52d-49c00f8bedf9) Or use this one I made: [cmd-869.zip](https://github.com/microsoft/terminal/files/10873195/cmd-869.zip), for the sake of example I picked code page 869 (Greek), but it can be any code page. 2. open the shortcut and type "chcp" to check current code page. ### Expected Behavior "chcp" returns the code page in the shortcut. This is the behaviour if "legacy console mode" is on. (sorry I can't make the text bigger :D) <img width="109" alt="image" src="https://user-images.githubusercontent.com/77467869/222484398-53540a6c-0255-4983-9987-8cc55eea0716.png"> ### Actual Behavior The default system code page is returned, the code page in the shortcut has no effect. I tried setting the system code page to something other than 65001 and it still occurs, so utf-8 is not the issue here. <img width="311" alt="image" src="https://user-images.githubusercontent.com/77467869/222485196-81c3ba8c-29a6-4be0-8be5-5e46c0814ffd.png">
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#19479