ssh3
ssh3 copied to clipboard
Unicode support: LANG env variables is not getting passed
When I connect with usual ssh and type some Cyrillic letters it's ok, but when I connect via ssh3 and try to type something Cyrillic, the command line just brakes, only one letter make it broken.
Also when I try to list a directory with files not in standard ASCII symbols, is shows quite strange escaped characters.
ls -la command gives me something like this:
drwxr-xr-x 2 grbit grbit 4096 Aug 15 21:50 youtube
drwxrwxr-x 3 grbit grbit 4096 Jun 24 18:37 ''$'\320\220\320\261\321\201\321\202\321\200\320\260\320\272\321\206\320\270\321\217'' '$'\320\230\321\201\320\272\321\203\321\201\321\201\321\202\320\262\320\276'' '$'\320\264\320\270\320\267\320\260\320\271\320\275\320\260'
-rw-r--r-- 1 grbit grbit 2033804138 Nov 27 2023 ''$'\320\221\321\200\320\265\320\274\320\265\320\275\321\201\320\272\320\270\320\265'' '$'\320\234\321\203\320\267\321\213\320\272\320\260\320\275\321\202\321\213'' '$'\320\270'' Co.mkv'
Your LANG and/or LC_* variable(s) is not getting passed correctly.
Your
LANGand/orLC_*variable(s) is not getting passed correctly.
Thank you very much! Indeed, setting those variables helped and solved the problem instantly. I think I can add them into .bashrc file to be sure they are always set.
At the same time, I wonder what is the reason these variables are not getting passed? Do you know to fix it once and for all?
I found that for openssh there are default settings that allow passing locale variables. For client settings there is SendEnv LANG LC_* and for server AcceptEnv LANG LC_*.
Is there any similar way to pass it correctly in ssh3? I have en_GB.utf8 by default on my local machine and on my server. For some reason export LANG=es_GB.UTF-8 in my current ssh session doesn't work properly, but export LANG=C.utf8 does.
It's possible that your remote system don't have a en_GB "locale archive". On glibc systems locales are read from these archives for startup speed, but generating them takes time and disk space, so most people just turn on a handful of locales. locale-gen and /etc/locale.gen are what you want to search up