tcsh-org / tcsh

This is a read-only mirror of the tcsh code repository.
https://www.tcsh.org/
Other
232 stars 42 forks source link

Garbled characters with ja_JP.eucJP encoding #34

Open bukatlib opened 3 years ago

bukatlib commented 3 years ago

tcsh garbles characters when eucJP encoding is used. $ LANG=ja_JP.eucJP LC_ALL=ja_JP.eucJP tcsh tcsh $ unknown_command unknown_command: .

Note that it works when UTF-8 encoding is used instead. $ LANG=ja_JP.UTF-8 LC_ALL=ja_JP.UTF-8 tcsh tcsh $ unknown_command unknown_command: コマンドが見つかりません.

I got the same results on Solaris and Linux with tcsh 6.22.02 installed. It looks like that only UTF-8 is considered in NLSClassify function (commit 4b12ecbf10800d921b3509071a046e08b364e20d).

Thank you for your help and feedback.

zoulasc commented 3 years ago

How do I reproduce this? What do I need to install and run on what OS?

christos

On Nov 9, 2020, at 8:44 AM, Libor Bukata notifications@github.com wrote:

LANG=ja_JP.UTF-8 LC_ALL=ja_JP.UTF-8 tcsh

bukatlib commented 3 years ago

On Solaris: $ nlsadm set-system-locale ja_JP.eucJP $ init 6

On Fedora Linux: $ dnf install vlgothic-fonts $ localectl set-locale LANG=ja_JP.eucJP

Afterwards, you can run the following command to see garbled characters: LANG=ja_JP.eucJP LC_ALL=ja_JP.eucJP tcsh tcsh $ unknown_command unknown_command: .