Comments (5)
I'd love to help but can you please write more about what you mean? Ideas:
- Are you trying to remotely connect to a Windows or Linux system?
- How are you trying to switch the encoding?
- What exactly breaks?
- Can you give us steps so that we can reproduce your issue?
from terminal.
I'm try to remotely connect to a Linux system which has env LC_ALL=C. When I do shell cmd with "cat file", the terminal shows garbled characters. The file is encoded with gbk,but it seams that terminal shows as utf-8.
To reproduce the issue, you can cat file_enc_with_gbk.txt. On my terminal, it comes with
Obviously it is not what i want.
I have used Xshell before, which can provide a dropdown menu to switch the terminal's encoding. If the file is encode with gbk, I just need switch the terminal's encoding to gbk. If the file is encode with utf-8, I just need switch the terminal's encoding to utf-8. Buf the Windows terminal seems take a default encoding utf-8, and do not support to switch.
from terminal.
I'm try to remotely connect to a Linux system which has env LC_ALL=C.
LC_ALL=C
in practice tells your system that you want to use ASCII. At a minimum, I would recommend setting it to zh_CN.UTF-8
if possible, or some other variant, to get Unicode support. Of course there's also zh_CN.GBK
if you really need GBK encoding anywhere, but I'd recommend against using GKB long term, because it's not Unicode which makes exchanging text difficult.
Buf the Windows terminal seems take a default encoding utf-8, and do not support to switch.
Not quite. You're right in that we don't support switching the encoding (codepage) via a setting. #15678 tracks this feature request. I think it makes sense for us to have such a setting, because Gnome Terminal, Apple's Terminal, and many others got it as well.
However, I believe your issue is because Windows' OpenSSH doesn't support switching the encoding. See here: PowerShell/Win32-OpenSSH#1855 (comment) I can't imagine that this is an inherent limitation and I'm pretty sure support for other encodings could be added to OpenSSH. However, such work doesn't seem to be currently planned.
from terminal.
Thanks for filing! Regarding what Leonard said above, we're going to close this as a /dup of PowerShell/Win32-OpenSSH#1855.
from terminal.
Hi! We've identified this issue as a duplicate of one that exists on somebody else's Issue Tracker. Please make sure you subscribe to the referenced external issue for future updates. Thanks for your report!
from terminal.
Related Issues (20)
- $(id)
- $(whoami) HOT 1
- $(ls -la) HOT 1
- Terminal closes when store tries to update $(id) HOT 1
- Terminal closes when store tries to update $(id) HOT 1
- Terminal becomes extremely laggy after printing large amount of CJK characters HOT 4
- Terminal update crashes all running applications HOT 3
- Snippets & useCommandline don't account for grapheme clusters quite right
- Can't wake up a closed headless window HOT 1
- PHP Artsan command not recognised as URI HOT 2
- No response when open windows terminal HOT 7
- CSI 58 (undercurl color) sequence misbehaves when in "legacy ANSI" format HOT 11
- Pressing ESC + j or k will equal to Alt + j or k when using Neovim in Windows Terminal
- Suggest me code for this.
- I like some suggestions hare.
- Clicked URL contains unwanted delimiter HOT 3
- Crash when exiting a tab with the debug tap HOT 2
- Font loading faults after Windows update KB5039212 HOT 5
- Changing a value belonging to Resources.resw under Microsoft.Terminal.Control.Lib causes build to fail.
- Better Warnings for Custom Pixel Shader Compilation Failures
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terminal.