Loading...

Solve the encoding issue using xterm

Apps1yrs ago (2023)update ICSteve
344 0

[striped][/striped]

In some environments, even if we set all the following settings, we still can NOT get a correct UTF-8 encoding working.

$ locale
LANG=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE=C
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

$ printenv XTERM_LOCALE
en_US.UTF-8

And also have the following two lines in .Xresources:

xterm*locale: true
xterm*utf8: 1
Solve the encoding issue using xterm

The following settings may help us out.

Use uxterm

Instead of xterm, we can use uxterm. Just put the alias in your ~/.cshrc.

alias xterm "uxterm"

Use option when launching xterm

alias xterm "xterm -u8 -en utf-8 \!*"
© Copyright notes

Related posts

No comments

No comments...