[GH-ISSUE #1169] multi encoding support (GBK/GB18030) #678

Closed
opened 2026-02-27 00:00:34 +03:00 by kerem · 6 comments
Owner

Originally created by @yisiliang on GitHub (Mar 11, 2019).
Original GitHub issue: https://github.com/electerm/electerm/issues/1169

Electerm version:

v0.26.62

Operating system(linux, macos, or windows7/8/10?):

macos

Expected Behavior

Chinese character should be show correctly while remote LANG is GB18030.

[root@3aaee2d6db0d tmp]# ls -lrt weblogic.xml
-rw-r--r-- 1 cnaps2 cnaps2 659 11�� 27 17:26 weblogic.xml
[root@3aaee2d6db0d tmp]# env | grep LANG
LANG=zh_CN.GB18030
[root@3aaee2d6db0d tmp]# ls -lrt weblogic.xml | iconv -f GB18030 -t UTF-8 
-rw-r--r-- 1 cnaps2 cnaps2 659 11月 27 17:26 weblogic.xml
[root@3aaee2d6db0d tmp]# 

Current Behavior

Chinese character should be show correctly while remote LANG is GB18030.

[root@3aaee2d6db0d tmp]# ls -lrt weblogic.xml
-rw-r--r-- 1 cnaps2 cnaps2 659 11�� 27 17:26 weblogic.xml
[root@3aaee2d6db0d tmp]# env | grep LANG
LANG=zh_CN.GB18030
[root@3aaee2d6db0d tmp]# ls -lrt weblogic.xml | iconv -f GB18030 -t UTF-8 
-rw-r--r-- 1 cnaps2 cnaps2 659 11月 27 17:26 weblogic.xml
[root@3aaee2d6db0d tmp]# 

Possible Solution

N/A

Steps to Reproduce

  1. set LANG=zh_CN.GB18030 on remote host
    2.login and run ls -l

Context (Environment)

Detailed Description

Suggestions?

Add a encoding settings in label.

Originally created by @yisiliang on GitHub (Mar 11, 2019). Original GitHub issue: https://github.com/electerm/electerm/issues/1169 <!--- Provide some basic info --> ## Electerm version: v0.26.62 ## Operating system(linux, macos, or windows7/8/10?): macos ## Expected Behavior <!--- Tell me what should happen --> Chinese character should be show correctly while remote LANG is GB18030. ``` [root@3aaee2d6db0d tmp]# ls -lrt weblogic.xml -rw-r--r-- 1 cnaps2 cnaps2 659 11�� 27 17:26 weblogic.xml [root@3aaee2d6db0d tmp]# env | grep LANG LANG=zh_CN.GB18030 [root@3aaee2d6db0d tmp]# ls -lrt weblogic.xml | iconv -f GB18030 -t UTF-8 -rw-r--r-- 1 cnaps2 cnaps2 659 11月 27 17:26 weblogic.xml [root@3aaee2d6db0d tmp]# ``` ## Current Behavior <!--- Tell me what happens instead of the expected behavior --> Chinese character should be show correctly while remote LANG is GB18030. ``` [root@3aaee2d6db0d tmp]# ls -lrt weblogic.xml -rw-r--r-- 1 cnaps2 cnaps2 659 11�� 27 17:26 weblogic.xml [root@3aaee2d6db0d tmp]# env | grep LANG LANG=zh_CN.GB18030 [root@3aaee2d6db0d tmp]# ls -lrt weblogic.xml | iconv -f GB18030 -t UTF-8 -rw-r--r-- 1 cnaps2 cnaps2 659 11月 27 17:26 weblogic.xml [root@3aaee2d6db0d tmp]# ``` ## Possible Solution <!--- Not obligatory, but suggest a fix/reason for the bug, --> N/A ## Steps to Reproduce <!--- Provide a link to a live example, or an unambiguous set of steps to --> <!--- reproduce this bug. Include code to reproduce, if relevant --> 1. set LANG=zh_CN.GB18030 on remote host 2.login and run `ls -l` ## Context (Environment) <!--- How has this issue affected you? What are you trying to accomplish? --> <!--- Providing context helps us come up with a solution that is most useful in the real world --> ## Detailed Description <!--- Provide a detailed description of the change or addition you are proposing --> ## Suggestions? <!--- Not a bug report, just some thoughts or suggestions? It is totally OK and welcome too --> Add a encoding settings in label.
kerem 2026-02-27 00:00:34 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@yisiliang commented on GitHub (Apr 8, 2020):

still not work on v1.3.15。

(cnaps2@3aaee2d6db0d)/tmp/a> env | grep LANG
LANG=zh_CN.GB18030
NLS_LANG=american_america.ZHS16GBK
(cnaps2@3aaee2d6db0d)/tmp/a> ls -lrt | iconv -f GB18030 -t UTF-8
总用量 0
(cnaps2@3aaee2d6db0d)/tmp/a> ls -lrt
 0
(cnaps2@3aaee2d6db0d)/tmp/a> 
<!-- gh-comment-id:610793954 --> @yisiliang commented on GitHub (Apr 8, 2020): still not work on v1.3.15。 ``` (cnaps2@3aaee2d6db0d)/tmp/a> env | grep LANG LANG=zh_CN.GB18030 NLS_LANG=american_america.ZHS16GBK (cnaps2@3aaee2d6db0d)/tmp/a> ls -lrt | iconv -f GB18030 -t UTF-8 总用量 0 (cnaps2@3aaee2d6db0d)/tmp/a> ls -lrt 0 (cnaps2@3aaee2d6db0d)/tmp/a> ```
Author
Owner

@zxdong262 commented on GitHub (Apr 8, 2020):

There is encode option in bookmark form, can you try it, set it to GB18030
Screen Shot 2020-04-08 at 5 04 27 PM

@yisiliang

<!-- gh-comment-id:610842982 --> @zxdong262 commented on GitHub (Apr 8, 2020): There is encode option in bookmark form, can you try it, set it to GB18030 <img width="400" alt="Screen Shot 2020-04-08 at 5 04 27 PM" src="https://user-images.githubusercontent.com/1641949/78765813-15cfb300-79bb-11ea-87cb-4c7b015cf15e.png"> @yisiliang
Author
Owner

@yisiliang commented on GitHub (Apr 8, 2020):

There is encode option in bookmark form, can you try it, set it to GB18030
Screen Shot 2020-04-08 at 5 04 27 PM

@yisiliang

yes, i have set encode as "gb18030", but still not working...

<!-- gh-comment-id:610853115 --> @yisiliang commented on GitHub (Apr 8, 2020): > There is encode option in bookmark form, can you try it, set it to GB18030 > <img alt="Screen Shot 2020-04-08 at 5 04 27 PM" width="400" src="https://user-images.githubusercontent.com/1641949/78765813-15cfb300-79bb-11ea-87cb-4c7b015cf15e.png"> > > @yisiliang yes, i have set encode as "gb18030", but still not working...
Author
Owner

@yisiliang commented on GitHub (Apr 8, 2020):

WechatIMG433 WechatIMG434

@zxdong262 please help to check, thank you very much.

<!-- gh-comment-id:610855184 --> @yisiliang commented on GitHub (Apr 8, 2020): <img width="744" alt="WechatIMG433" src="https://user-images.githubusercontent.com/8147509/78768620-c55a5480-79be-11ea-9cbd-72dbf42dd455.png"> <img width="653" alt="WechatIMG434" src="https://user-images.githubusercontent.com/8147509/78768651-cee3bc80-79be-11ea-87e9-ba56e66a521e.png"> @zxdong262 please help to check, thank you very much.
Author
Owner

@yisiliang commented on GitHub (Apr 9, 2020):

看起来从ssh返回的信息都直接跑了如下代码:
4371586422738_ pic
而没有跑这个函数:
4381586422757_ pic_hd

<!-- gh-comment-id:611417457 --> @yisiliang commented on GitHub (Apr 9, 2020): 看起来从ssh返回的信息都直接跑了如下代码: ![4371586422738_ pic](https://user-images.githubusercontent.com/8147509/78877496-85a97080-7a83-11ea-94c5-7ceecc3cc2e1.jpg) 而没有跑这个函数: ![4381586422757_ pic_hd](https://user-images.githubusercontent.com/8147509/78877516-8cd07e80-7a83-11ea-92b3-125ff6ea9d6e.jpg)
Author
Owner

@zxdong262 commented on GitHub (Apr 9, 2020):

升级到xtermjs v4导致的问题,得修复一下

<!-- gh-comment-id:611482817 --> @zxdong262 commented on GitHub (Apr 9, 2020): 升级到xtermjs v4导致的问题,得修复一下
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/electerm#678
No description provided.