3
Im accessing a remote computer using ssh and running a bash command to input symbols using standard input stream:
read test;echo $test
It's ok to input english letters and use backspace to delete them, then input other characters and iterate this steps any amount of times. But it becomes a disaster when I use other utf-8 symbols, like russian ones, which require 2 bytes instead of 1, as english ones do. E.g., I input:
абвгдежз
After that, I use backspace for 8 times, and input other symbols:
привет
And press Enter key. But instead of the result which would equal my last input, I get the following:
абвгпривет
Which means that 8 backspace deleted only 4 symbols.
I do use linux ubuntu 12.04. Tried different consoles: standard one, terminator; different types of backspace options (as ASCII-del or Ctrl+H); setting $LC_TYPE to ru_RU.UTF-8, but nothing works. There is no such a problem using local console. Thank you in advance.
update: I've also got a video of this issue, please watch it at youtube
Thank you for your reply. I've already got $LC_TYPE set up as ru_RU.UTF-8 both on client and server side. Sadly, that does not resolve an issue. – None – 2013-04-24T07:34:54.937
@VsevolodAvramov Did you try to
export
that variable? And: When did you set it? If you set it in the shell, it might be too late... – glglgl – 2013-04-24T07:40:11.937@glglgl, I've got the following configuaration:
Host * SendEnv LC_* 2) AcceptEnv directive is present in the server configuration at /etc/ssh/sshd_config 3) First lines of ~/.bashrc both on client- and serverside are export LC_CTYPE=ru_RU.utf8 4) locale -a shows ru_RU.utf8 in the list of available options for locale. Any more ideas? Thanks. – None – 2013-04-24T08:02:07.730
@glglgl I've also recorded a video which proves that variable LC_ENV is set up properly. Please watch it at youtube
– None – 2013-04-24T08:20:23.557