OSDev.org
https://forum.osdev.org/

[Solved] Terminal emulator CJK glitches
https://forum.osdev.org/viewtopic.php?f=11&t=44778
Page 1 of 1

Author:  pvc [ Wed Jun 30, 2021 1:16 am ]
Post subject:  [Solved] Terminal emulator CJK glitches

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?

Author:  bzt [ Wed Jun 30, 2021 3:13 am ]
Post subject:  Re: Terminal emulator CJK glitches

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

Author:  pvc [ Wed Jun 30, 2021 5:34 am ]
Post subject:  Re: Terminal emulator CJK glitches

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

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/