0

On one system only I have the problem, that when I type the german letter "ö" over ssh, bash shows

(arg: 6)

instead of inserting the letter. I do not have the problem on other systems and running "dash" the letter shows up correctly.

Why does bash interpret the letter as some shortcut (probably alt+6)?

This even happens with an empty .bashrc on Debian bullseye.

Output of locale:

LANG=C
LANGUAGE=
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=

dpkg-reconfigure locales shows that de_DE.UTF-8 UTF-8 locales are generated, the environment is just configured to use C.
Pasting the locale output from my local system, which uses de_DE.UTF-8 for everything into the shell does not change the behavior.

I tested with rxvt-unicode and xterm and both show the problem.

allo
  • 916
  • 1
  • 7
  • 13
  • I added the info – allo Sep 16 '21 at 09:42
  • Try export LC_ALL="de_DE.UTF-8" (on the remote system) – K-attila- Sep 16 '21 at 09:48
  • Strange, this works in .bashrc but not when I type it into an interactive shell. And I wonder why it works at all. Usually `ö` should result in `;` when the keyboard layout is wrong. – allo Sep 16 '21 at 09:51
  • related: [Non-ascii chars are no longer displayed in bash](//unix.stackexchange.com/q/449003), [Bash seems to be in special mode](//unix.stackexchange.com/q/368803) and `echo ö | cat -v` – Stéphane Chazelas Sep 16 '21 at 09:52
  • @StéphaneChazelas The accepted solution works. I only wonder why. And why a standard Debian doesn't seem to use UTF-8 by default. Probably the environment should have the `LC_` variables with UTF-8? – allo Sep 16 '21 at 09:54
  • 1
    @allo, AFAIK, UTF-8 has been the charset of default system locale in Debian for decades at least when you select a real default user locale upon installation. It all boils down to how you deployed Debian (debootstrap may skip the locale config for instance) and how your users configure the locale for themselves when different from the system locale. – Stéphane Chazelas Sep 16 '21 at 10:07

0 Answers0