lnav icon indicating copy to clipboard operation
lnav copied to clipboard

cannot input Chinese words in `Prompt`

Open hu-chia opened this issue 3 months ago • 4 comments

lnav version the latest (v0.13.2)

Describe the bug Please check the screen record:

https://github.com/user-attachments/assets/4d1636a2-7af2-4fb0-b73e-3aaaf4da555b

hu-chia avatar Nov 07 '25 07:11 hu-chia

Can you please provide some more details, like the operating system and terminal you are using. An lnav debug log would also be helpful. You can pass -d /tmp/lnav-debug.log` to lnav on the command-line to have it write a log to the given file.

I tried a couple things on Ubuntu 24.04 with gnome-terminal and it seemed to work. I copy & pasted some Chinese characters and switched keyboard-inputs. The characters showed up as expected.

tstack avatar Nov 07 '25 13:11 tstack

thanks for your response and I’m using macOS 26.0.1 and Ghostty 1.2.3. This problem happened when I input the words by the Rime input source but I believe other input sources can also reproduce this issue.

Here are those logs, please let me know if you need more information.

BTW, copy and paste cannot reproduce this problem.

lnav-debug.log

hu-chia avatar Nov 07 '25 14:11 hu-chia

Sorry, I'm not sure what's going on. I'm not clear on how to use the Rime input source and things seem to work fine with the Pinyin input. From the log, it looks like something is sending some unknown escape sequence that ends in u. The CSI u escape sequence is just for saving the cursor position, but the there's a bunch of extra parameters there. Someone with more expertise would need to take a look.

tstack avatar Nov 23 '25 15:11 tstack

I can also reproduce this problem using the Pinyin input method that comes with macOS.

I did some digging, if I make a mistake, please feel free to correct it. The numbers ending in u are the Unicode representation of the input Chinese characters, so I guess there is a Ghostty-specific (or not very common) control sequence used for inputting Unicode characters. This looks a bit like what is described here.

Image

hu-chia avatar Nov 24 '25 02:11 hu-chia