microsoft / microsoft/terminal

Setting to choose codepage of new terminal session for each profile.

Open
#15,678 4 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Settings Issue-Feature Product-Conpty Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

# Description of the new feature/enhancement
Let user to set initial/startup codepage(CP) of new terminal session in each terminal profile setting.
The "Advanced" or "Appearance" setting of "Default" profile and each profile will have radio buttons or dropdown menu to choose one of:
* Do nothing (old behavior, user default CP unless registry setting is modified. )
* UTF-8 (CP 65001)
* Windows-1252 (CP 1252, extended US-ASCII similar to ISO-8859-1(West European CP)
* Force user default CP, regardless of CP related registry settings.
* (Optional) Custom CP chosen by user.

Currently, each terminal session starts with CP of user-default CP. If the CP doe not match what user want, user have to change manually CP with `chcp.com` command or automatically with adding `chcp.com` to `HKCU\SOFTWARE\Microsoft\Command Processor\"AutoRun"` registry or modify `HKCU\Console\"CodePage"` registry entry. All these measures are cumbersome and inflexible. Hard to change setting. Other issue even proposed to set UTF-8 as default CP.

# Proposed technical implementation details (optional)

Implement and execute function of `CHCP.com` command in the terminal session start up routine as chose in the profile setting.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the terminal session startup routine and the profile settings for the Default and per-profile configurations. Review how chcp.com changes the session code page and determine how the listed options should be represented and applied. Done means each profile can select the requested startup behavior and a new session uses that code page.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.