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)
- Interested in working at MS Terminal/windows team and get paid for that if possible HOT 1
- Ctrl+D or Enter? HOT 3
- Mouse events are not sent when the mouse is outside the top of the WT HOT 2
- Don't close Terminal upon closing the last tab HOT 3
- Typo in Czech translation of the desktop context menu item HOT 2
- The "Overwrite key binding" warning is very broken HOT 6
- Display more info for WinGet suggestions
- Efficiency Mode HOT 4
- CANARY: ALT+NUMPAD ADD is Broken HOT 3
- Translation error: 'Shell' translated as '外壳' in Chinese localization HOT 3
- Title bar draw problem next to close button HOT 5
- enable Intel CET HOT 3
- ansi background color is consistently rendered outside of the proper area when dealing with multiple lines of double-height text HOT 5
- when `useCommandline`, trim the CurrentCommand at the cursor pos (to prevent pwsh ghost text from populating menu) HOT 1
- Filtering the search to display 0 actions does not clear the preview HOT 1
- Low reliability of VT replies HOT 4
- Holding Enter while opening a new tab crashes Terminal
- reserved HOT 1
- Dim terminal when app terminates HOT 4
- encountered errors while loading user settings HOT 4
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.