how to show c++ printf gb2312 world #21276

Closed
opened 2026-01-31 07:38:26 +00:00 by claunia · 11 comments
Owner

Originally created by @wangwenqiangGitHub on GitHub (Feb 19, 2024).

Windows Terminal version

No response

Windows build number

No response

Other Software

No response

Steps to reproduce

when i use this terminal show c++ printf function information about gb2312, is error

Expected Behavior

No response

Actual Behavior

when i use this terminal show c++ printf function information about gb2312, is error

Originally created by @wangwenqiangGitHub on GitHub (Feb 19, 2024). ### Windows Terminal version _No response_ ### Windows build number _No response_ ### Other Software _No response_ ### Steps to reproduce when i use this terminal show c++ printf function information about gb2312, is error ### Expected Behavior _No response_ ### Actual Behavior when i use this terminal show c++ printf function information about gb2312, is error
claunia added the Issue-QuestionIssue-BugNeeds-Tag-FixResolution-Answered labels 2026-01-31 07:38:26 +00:00
Author
Owner

@wangwenqiangGitHub commented on GitHub (Feb 19, 2024):

Charecter encoding how set GB2312 like secureCRT

@wangwenqiangGitHub commented on GitHub (Feb 19, 2024): Charecter encoding how set GB2312 like secureCRT
Author
Owner

@wangwenqiangGitHub commented on GitHub (Feb 19, 2024):

Charecter encoding how set GB2312 like secureCRT

@wangwenqiangGitHub commented on GitHub (Feb 19, 2024): Charecter encoding how set GB2312 like secureCRT
Author
Owner

@wangwenqiangGitHub commented on GitHub (Feb 19, 2024):

image

@wangwenqiangGitHub commented on GitHub (Feb 19, 2024): ![image](https://github.com/microsoft/terminal/assets/28779327/90d74e89-f4e3-4039-b07d-e57f60823b24)
Author
Owner

@wangwenqiangGitHub commented on GitHub (Feb 19, 2024):

image

this also can't correct show gb2312

@wangwenqiangGitHub commented on GitHub (Feb 19, 2024): > ![image](https://private-user-images.githubusercontent.com/28779327/305785844-90d74e89-f4e3-4039-b07d-e57f60823b24.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDgzMTU3NzEsIm5iZiI6MTcwODMxNTQ3MSwicGF0aCI6Ii8yODc3OTMyNy8zMDU3ODU4NDQtOTBkNzRlODktZjRlMy00MDM5LWIwN2QtZTU3ZjYwODIzYjI0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAyMTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMjE5VDA0MDQzMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBlYjAwZGRiMGRlOWRkMDE0MTZjODZkMzRlZTY1MGQ3MzJiYzczYzk3YmJhMTJjMDYzNzJjMWIzY2RlZTU0ZTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.oYBZEx9paI64EKk5ycBEo1oYkJNPfNwTX9XWWPUeVv0) this also can't correct show gb2312
Author
Owner

@zadjii-msft commented on GitHub (Feb 19, 2024):

Sorry could you explain a bit more about what you're trying to accomplish here? How you have your terminal set up/?

Only guessing from the bits here, I'm guessing that you didn't pass -li to the bash commandline in your profile's settings. But there's not a lot to work with here. I'm not really sure what is expected, and what you're actually seeing.

@zadjii-msft commented on GitHub (Feb 19, 2024): Sorry could you explain a bit more about what you're trying to accomplish here? How you have your terminal set up/? Only guessing from the bits here, I'm guessing that you didn't pass `-li` to the `bash` commandline in your profile's settings. But there's not a lot to work with here. I'm not really sure what is expected, and what you're actually seeing.
Author
Owner

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

In other words, please provide us with detailed "reproduction steps". For instance you can write about:

  • Your Windows version
  • Your Windows Terminal version
  • What environment you're using (WSL, MSYS2, ...)
  • What shell you're using (bash, zsh, fish, ...)
  • How you customized your shell (oh-my-zsh, powerlevel10k, ...)
  • An example C/C++ source code that shows the problem
  • How you run your example
@lhecker commented on GitHub (Feb 19, 2024): In other words, please provide us with detailed "reproduction steps". For instance you can write about: * Your Windows version * Your Windows Terminal version * What environment you're using (WSL, MSYS2, ...) * What shell you're using (bash, zsh, fish, ...) * How you customized your shell (oh-my-zsh, powerlevel10k, ...) * An example C/C++ source code that shows the problem * How you run your example
Author
Owner

@wangwenqiangGitHub commented on GitHub (Feb 20, 2024):

In other words, please provide us with detailed "reproduction steps". For instance you can write about:

  • Your Windows version
  • Your Windows Terminal version
  • What environment you're using (WSL, MSYS2, ...)
  • What shell you're using (bash, zsh, fish, ...)
  • How you customized your shell (oh-my-zsh, powerlevel10k, ...)
  • An example C/C++ source code that shows the problem
  • How you run your example

zsh + tmux
Uploading iwEcAqNwbmcDAQTRAxoF0QFxBrBs5CFlmPuL0AXCrlK1-o4AB9IUsQSOCAAJomltCgAL0TkB.png_720x720q90.jpg…

@wangwenqiangGitHub commented on GitHub (Feb 20, 2024): > In other words, please provide us with detailed "reproduction steps". For instance you can write about: > > * Your Windows version > * Your Windows Terminal version > * What environment you're using (WSL, MSYS2, ...) > * What shell you're using (bash, zsh, fish, ...) > * How you customized your shell (oh-my-zsh, powerlevel10k, ...) > * An example C/C++ source code that shows the problem > * How you run your example zsh + tmux ![Uploading iwEcAqNwbmcDAQTRAxoF0QFxBrBs5CFlmPuL0AXCrlK1-o4AB9IUsQSOCAAJomltCgAL0TkB.png_720x720q90.jpg…]()
Author
Owner

@wangwenqiangGitHub commented on GitHub (Feb 20, 2024):

iwEdAqNwbmcDAQTRBJkF0QIpBrACwyHizpObBQXCrlK2GqYAB9IUsQSOCAAJomltCgAL0Vny png_720x720q90

terminal tmux zsh and show this:
iwEcAqNwbmcDAQTRAxoF0QFxBrBs5CFlmPuL0AXCrlK1-o4AB9IUsQSOCAAJomltCgAL0TkB png_720x720q90

@wangwenqiangGitHub commented on GitHub (Feb 20, 2024): ![iwEdAqNwbmcDAQTRBJkF0QIpBrACwyHizpObBQXCrlK2GqYAB9IUsQSOCAAJomltCgAL0Vny png_720x720q90](https://github.com/microsoft/terminal/assets/28779327/b0c8d00d-a7ab-43b0-b742-9e023e9475c3) terminal tmux zsh and show this: ![iwEcAqNwbmcDAQTRAxoF0QFxBrBs5CFlmPuL0AXCrlK1-o4AB9IUsQSOCAAJomltCgAL0TkB png_720x720q90](https://github.com/microsoft/terminal/assets/28779327/3b365e9c-6b66-4c9f-bc25-8d85c47b7641)
Author
Owner

@wangwenqiangGitHub commented on GitHub (Feb 21, 2024):

not tmux , only zsh terminal still not
image

@wangwenqiangGitHub commented on GitHub (Feb 21, 2024): not tmux , only zsh terminal still not ![image](https://github.com/microsoft/terminal/assets/28779327/f4619c2f-710c-43e1-95ec-3b008bdc2e89)
Author
Owner

@o-sdn-o commented on GitHub (Feb 21, 2024):

A possible solution is to use UTF-8 (CP65001) code page everywhere instead of GB2312 (CP936).

image

@o-sdn-o commented on GitHub (Feb 21, 2024): A possible solution is to use UTF-8 (CP65001) code page everywhere instead of GB2312 (CP936). ![image](https://github.com/microsoft/terminal/assets/11535558/759f6ab9-0905-4a5a-b6f6-2661ec8823ee)
Author
Owner

@carlos-zamora commented on GitHub (Feb 21, 2024):

Yes, please use UTF-8. g++ doesn't support windows code pages.

@carlos-zamora commented on GitHub (Feb 21, 2024): Yes, please use UTF-8. g++ doesn't support windows code pages.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21276