For pasting text, in urxvt/rxvt-unicode one can use middle button to paste PRIMARY selection.
I can do such Mouse-Middle-Click paste in my local urxvt terminal and even a remote server, in Chinese/utf8 strings. EG if I run date under LANG=zh_CN.utf8 environment and I'll get:
$ date 2023年 03月 18日 星期六 15:01:11 EDT I can then mouse select the Chinese/utf8 string 星期六 and Mouse-Middle-Click paste into my urxvt terminal (after my echo), like:
$ echo 星期六 星期六 in my local urxvt terminal and even a remote server. However, if I ssh into my other local machines, or my Oracle cloud then try the same approach, instead of echo 星期六 showing up on my command line, I'm getting:
if I select the whole echo 星期六, and past into the remote session, then it'll work, for either my local machines or my Oracle cloud server.
Here is the screen-cast to illustrate it:
EG
- the Chinese/utf8 strings cannot be pasted into my remote urxvt terminal normally.
- however if there are some leading normal ascii characters before the Chinese/utf8 string, then the whole thing can be pasted in normally.
All my environment are configured the same across all of them, So I'm thinking there must be something odd with my configuration which works only locally but not remotely.
(My local machines and Oracle cloud server displays Chinese/utf8 strings/filenames just fine though.)
UPDATE: more debug info
$ locale LANG=zh_CN.utf8 LANGUAGE= LC_CTYPE="zh_CN.utf8" LC_NUMERIC="zh_CN.utf8" LC_TIME="zh_CN.utf8" LC_COLLATE="zh_CN.utf8" LC_MONETARY="zh_CN.utf8" LC_MESSAGES="zh_CN.utf8" LC_PAPER="zh_CN.utf8" LC_NAME="zh_CN.utf8" LC_ADDRESS="zh_CN.utf8" LC_TELEPHONE="zh_CN.utf8" LC_MEASUREMENT="zh_CN.utf8" LC_IDENTIFICATION="zh_CN.utf8" LC_ALL= $ locale charmap UTF-8 $ grep '^set.*meta' ~/.inputrc set meta-flag on set input-meta On set output-meta On How to fix it?


locale, it should look reasonable. Check the output oflocale charmap, it should sayUTF-8. Check your shell's config. Is your shellbash? If so,.inputrcshould contain things likeset input-meta onandset output-meta on./etc/inputrcand.inputrcon the two systems, looking for other differences. Also check bash's version, maybe the remote one is an ancient version that was buggy? But I'm just shooting in the dark.