Page 1 of 1

[Solved] Terminal emulator CJK glitches

Posted: Wed Jun 30, 2021 1:16 am
by pvc
I can't seem to find a terminal emulator program for Linux that deals with CJK input as it should. xterm can't display any at all. xfce4-terminal displays them ok, but refuses to take CJK characters as input. gnome-terminal doesn't even start on my system, for whatever reason. Other emulators (like kitty, tilda, terminator, etc.) display CJK text ok, accept input, but things get horribly messed up when you try to edit existing text.

Is there any terminal emulator that deals with CJK input as expected?

Re: Terminal emulator CJK glitches

Posted: Wed Jun 30, 2021 3:13 am
by bzt
Yeah, xterm won't work for sure, you'll need uxterm to get UNICODE support. It's lightweight brother, urxvt is pretty damn good too. That's for the output.

As for the input, you'll also have to enable full 8-bit input in /etc/inputrc, and set up some locale that supports UTF-8 (for example "en_US.utf-8"), otherwise you won't be able to enter BMP code points, and you'll be limited to ASCII (it strongly depends on distro how it is configured by default). I don't know about kitty, tilda etc., but this has to be set up correctly for all terminals that depend on the readline library (like uxterm and urxvt, and probably xfce4-terminal too).

Cheers,
bzt

Re: Terminal emulator CJK glitches

Posted: Wed Jun 30, 2021 5:34 am
by pvc
Another PEBCAK :oops:
I was using default `C` locale. After setting it to `en_US.UTF-8` everything works as expected.