Pasting non-ascii (utf8) into remote urxvt terminal
1
vote
0
answers
144
views
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
if I select the whole
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
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:

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:

$ 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?
Asked by xpt
(1858 rep)
Mar 24, 2023, 06:08 PM
Last activity: Mar 25, 2023, 07:04 PM
Last activity: Mar 25, 2023, 07:04 PM