This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Connecting to Servers with Special Character Encoding (GBK Example)
Overview
Some servers, particularly those running older systems or specific regional configurations, may use character encodings other than UTF-8. Electerm supports connecting to such servers by configuring the appropriate character encoding settings.
GBK Encoding Example
GBK (GuoBiao Kuozhan) is a character encoding standard used primarily for Simplified Chinese characters. Here's how to configure Electerm to properly connect to a GBK-encoded server.
Step 1: Create SSH Bookmark with GBK Settings
When creating a new SSH bookmark in Electerm:
- Open the bookmark creation dialog
- In the Encode field, select or enter
gbk - In the ENV:LANG section, set Value:
zh_CN.GBK(or appropriate GBK locale for your system)
Step 2: Connect to the Server
Once the bookmark is configured with the correct encoding settings:
- SSH terminal sessions will display characters correctly using GBK encoding
- SFTP file transfers will automatically respect the GBK encoding for filenames and content
- Command outputs and file listings will be properly decoded
Supported Encodings
Electerm supports various character encodings including:
- UTF-8 (default)
- GBK/GB2312 (Simplified Chinese)
- Big5 (Traditional Chinese)
- Shift_JIS (Japanese)
- EUC-KR (Korean)
- ISO-8859 series (Western European)
- And many others
Troubleshooting
If you encounter garbled text:
-
Verify the server's actual encoding by checking system locale:
locale echo $LANG -
Ensure the encoding in your bookmark matches the server's encoding
-
For SFTP operations, the encoding setting is automatically applied
Notes
- The encoding setting affects both terminal display and SFTP file operations
- Environment variables like
LANGare set in the SSH session - Changes take effect immediately upon reconnection with the updated bookmark
概述
某些服务器,特别是运行旧系统或特定区域配置的服务器,可能使用除 UTF-8 之外的字符编码。Electerm 支持通过配置适当的字符编码设置来连接此类服务器。
GBK 编码示例
GBK(国标扩展)是一种主要用于简体中文字符的字符编码标准。以下是如何配置 Electerm 以正确连接到 GBK 编码的服务器。
步骤 1:使用 GBK 设置创建 SSH 书签
在 Electerm 中创建新的 SSH 书签时:
- 打开书签创建对话框
- 在 编码 字段中,选择或输入
gbk - 在 ENV:LANG 部分,设置值:
zh_CN.GBK(或适合您系统的适当 GBK 区域设置)
步骤 2:连接到服务器
一旦书签配置了正确的编码设置:
- SSH 终端会话将使用 GBK 编码正确显示字符
- SFTP 文件传输将自动尊重文件名和内容的 GBK 编码
- 命令输出和文件列表将被正确解码
支持的编码
Electerm 支持各种字符编码,包括:
- UTF-8(默认)
- GBK/GB2312(简体中文)
- Big5(繁体中文)
- Shift_JIS(日文)
- EUC-KR(韩文)
- ISO-8859 系列(西欧)
- 以及许多其他编码
故障排除
如果遇到乱码:
-
通过检查系统区域设置来验证服务器的实际编码:
locale echo $LANG -
确保书签中的编码与服务器的编码匹配
-
对于 SFTP 操作,编码设置会自动应用
注意事项
- 编码设置会影响终端显示和 SFTP 文件操作
- 环境变量如
LANG在 SSH 会话中设置 - 更改会在使用更新书签重新连接时立即生效