[Solved] Terminal emulator CJK glitches

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
Post Reply
User avatar
pvc
Member
Member
Posts: 201
Joined: Mon Jan 15, 2018 2:27 pm

[Solved] Terminal emulator CJK glitches

Post 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?
Last edited by pvc on Wed Jun 30, 2021 5:34 am, edited 1 time in total.
User avatar
bzt
Member
Member
Posts: 1584
Joined: Thu Oct 13, 2016 4:55 pm
Contact:

Re: Terminal emulator CJK glitches

Post 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
User avatar
pvc
Member
Member
Posts: 201
Joined: Mon Jan 15, 2018 2:27 pm

Re: Terminal emulator CJK glitches

Post by pvc »

Another PEBCAK :oops:
I was using default `C` locale. After setting it to `en_US.UTF-8` everything works as expected.
Post Reply