Dear all, I have tested Anton's suggestions with the following results. Please, see below for more information.
Steps made: ; su - -c 'adduser testbash' ... ; cat /etc/passwd | grep testbash testbash:x:1002:1002:Test Bash,,,:/home/testbash:/bin/bash ; cat /etc/inittab | grep /sbin/getty | grep -v '^#' 1:2345:respawn:/sbin/getty --noclear 38400 tty1 2:23:respawn:/sbin/getty --login-program /lib/fgetty/login1 38400 tty2 Following steps, see below. Thank you! Ricardo Peliquero Anton Zinoviev <an...@lml.bas.bg> Wed, 5 Dec 2018 21:29:10 +0200: > On Wed, Dec 05, 2018 at 08:56:16AM +0000, Dmitry Bogatov wrote: > Suppose that we have a working bash shell with UTF-8 console where ñ > displays properly. Then try this: > > LANG=C bash # run a subshell in a non-UTF8 locale > > If you press ñ, you will see (arg: 1). The programs (including a > subshell) also work incorrectly because the locale is not UTF8. > Reproduced with expected result (within both login and login1 ttys). > Now execute this: > > LANG=..... (some UTF-8 locale) > > Now, if you press ñ, you will see (arg: 1) like before. The programs > (including a subshell), however, will work correctly. > Within login1: typing ñ echoes (arg: 1) $ LANG=es_AR.UTF-8 bash typing ñ echoes ñ > Now execute this: > > export LANG > > Now also ñ works correctly. typing ñ echoes ñ $ exit typing ñ echoes (arg: 1) > If you are sure that the problem does not come from the locale, > another thing to check is to compare the output of > > bind -v > bind -p > > in bash where ñ works properly and in bash where ñ leads to (arg: 1). ; diff bind_-v_testbash_login.txt bind_-v_testbash_login1.txt 8c8 < set convert-meta off --- > set convert-meta on ; diff bind_-p_login.txt bind_-p_login1.txt > \ diff_bind-p_login_login1.txt # (attached) > Also make sure there are no files ~/.inutrc and the variable INPUTRC > is unset. ; env # within both ttys ; diff env_login.txt env_login1.txt # (both attached) 2,3c2,4 < LANG=es_AR.UTF-8 < HUSHLOGIN=FALSE --- > drop_caps= > INIT_VERSION=sysvinit- > CONSOLE=/dev/console 5a7 > PREVLEVEL=N 7c9,12 < MAIL=/var/mail/testbash --- > UID=1002 > init=/sbin/init > BOOT_IMAGE=Linux > edd=off 10,11c15,17 < SHLVL=1 < LANGUAGE=es_AR:es --- > rootmnt=/root > RUNLEVEL=2 > SHLVL=2 13a20 > AUTOBOOT=YES ; set # within both ttys ; diff set_login.txt set_login1.txt 0a1 > AUTOBOOT=YES 10a12 > BOOT_IMAGE=Linux 11a14 > CONSOLE=/dev/console 22d24 < HUSHLOGIN=FALSE 24,25c26 < LANG=es_AR.UTF-8 < LANGUAGE=es_AR:es --- > INIT_VERSION=sysvinit- 30d30 < MAIL=/var/mail/testbash 37c37,38 < PPID=2702 --- > PPID=1 > PREVLEVEL=N 41a43 > RUNLEVEL=2 44c46 < SHLVL=1 --- > SHLVL=2 48c50,54 < _=set --- > _=env > drop_caps= > edd=off > init=/sbin/init > rootmnt=/root
4c4 < "\e\C-g": abort --- > "\M-\C-g": abort 11,12c11,12 < "\eOD": backward-char < "\e[D": backward-char --- > "\M-OD": backward-char > "\M-[D": backward-char 16,22c16,22 < "\e\C-h": backward-kill-word < "\e\C-?": backward-kill-word < "\e\e[D": backward-word < "\e[1;5D": backward-word < "\e[5D": backward-word < "\eb": backward-word < "\e<": beginning-of-history --- > "\M-\C-h": backward-kill-word > "\M-\C-?": backward-kill-word > "\M-\M-[D": backward-word > "\M-[1;5D": backward-word > "\M-[5D": backward-word > "\M-b": backward-word > "\M-<": beginning-of-history 24,27c24,27 < "\eOH": beginning-of-line < "\e[1~": beginning-of-line < "\e[H": beginning-of-line < "\e[200~": bracketed-paste-begin --- > "\M-OH": beginning-of-line > "\M-[1~": beginning-of-line > "\M-[H": beginning-of-line > "\M-[200~": bracketed-paste-begin 29c29 < "\ec": capitalize-word --- > "\M-c": capitalize-word 31c31 < "\e\C-]": character-search-backward --- > "\M-\C-]": character-search-backward 34,40c34,40 < "\e\e": complete < "\e!": complete-command < "\e/": complete-filename < "\e@": complete-hostname < "\e{": complete-into-braces < "\e~": complete-username < "\e$": complete-variable --- > "\M-\M-": complete > "\M-!": complete-command > "\M-/": complete-filename > "\M-@": complete-hostname > "\M-{": complete-into-braces > "\M-~": complete-username > "\M-$": complete-variable 46c46 < "\e[3~": delete-char --- > "\M-[3~": delete-char 48,59c48,59 < "\e\\": delete-horizontal-space < "\e-": digit-argument < "\e0": digit-argument < "\e1": digit-argument < "\e2": digit-argument < "\e3": digit-argument < "\e4": digit-argument < "\e5": digit-argument < "\e6": digit-argument < "\e7": digit-argument < "\e8": digit-argument < "\e9": digit-argument --- > "\M-\\": delete-horizontal-space > "\M--": digit-argument > "\M-0": digit-argument > "\M-1": digit-argument > "\M-2": digit-argument > "\M-3": digit-argument > "\M-4": digit-argument > "\M-5": digit-argument > "\M-6": digit-argument > "\M-7": digit-argument > "\M-8": digit-argument > "\M-9": digit-argument 87,112c87,112 < "\eA": do-lowercase-version < "\eB": do-lowercase-version < "\eC": do-lowercase-version < "\eD": do-lowercase-version < "\eE": do-lowercase-version < "\eF": do-lowercase-version < "\eG": do-lowercase-version < "\eH": do-lowercase-version < "\eI": do-lowercase-version < "\eJ": do-lowercase-version < "\eK": do-lowercase-version < "\eL": do-lowercase-version < "\eM": do-lowercase-version < "\eN": do-lowercase-version < "\eP": do-lowercase-version < "\eQ": do-lowercase-version < "\eR": do-lowercase-version < "\eS": do-lowercase-version < "\eT": do-lowercase-version < "\eU": do-lowercase-version < "\eV": do-lowercase-version < "\eW": do-lowercase-version < "\eX": do-lowercase-version < "\eY": do-lowercase-version < "\eZ": do-lowercase-version < "\el": downcase-word --- > "\M-A": do-lowercase-version > "\M-B": do-lowercase-version > "\M-C": do-lowercase-version > "\M-D": do-lowercase-version > "\M-E": do-lowercase-version > "\M-F": do-lowercase-version > "\M-G": do-lowercase-version > "\M-H": do-lowercase-version > "\M-I": do-lowercase-version > "\M-J": do-lowercase-version > "\M-K": do-lowercase-version > "\M-L": do-lowercase-version > "\M-M": do-lowercase-version > "\M-N": do-lowercase-version > "\M-P": do-lowercase-version > "\M-Q": do-lowercase-version > "\M-R": do-lowercase-version > "\M-S": do-lowercase-version > "\M-T": do-lowercase-version > "\M-U": do-lowercase-version > "\M-V": do-lowercase-version > "\M-W": do-lowercase-version > "\M-X": do-lowercase-version > "\M-Y": do-lowercase-version > "\M-Z": do-lowercase-version > "\M-l": downcase-word 116c116 < "\e\C-i": dynamic-complete-history --- > "\M-\C-i": dynamic-complete-history 120c120 < "\e>": end-of-history --- > "\M->": end-of-history 122,124c122,124 < "\eOF": end-of-line < "\e[4~": end-of-line < "\e[F": end-of-line --- > "\M-OF": end-of-line > "\M-[4~": end-of-line > "\M-[F": end-of-line 129,130c129,130 < "\eOC": forward-char < "\e[C": forward-char --- > "\M-OC": forward-char > "\M-[C": forward-char 132,136c132,136 < "\e\e[C": forward-word < "\e[1;5C": forward-word < "\e[5C": forward-word < "\ef": forward-word < "\eg": glob-complete-word --- > "\M-\M-[C": forward-word > "\M-[1;5C": forward-word > "\M-[5C": forward-word > "\M-f": forward-word > "\M-g": glob-complete-word 140c140 < "\e^": history-expand-line --- > "\M-^": history-expand-line 145,148c145,148 < "\e#": insert-comment < "\e*": insert-completions < "\e.": insert-last-argument < "\e_": insert-last-argument --- > "\M-#": insert-comment > "\M-*": insert-completions > "\M-.": insert-last-argument > "\M-_": insert-last-argument 152c152 < "\ed": kill-word --- > "\M-d": kill-word 157,159c157,159 < "\eOB": next-history < "\e[B": next-history < "\en": non-incremental-forward-search-history --- > "\M-OB": next-history > "\M-[B": next-history > "\M-n": non-incremental-forward-search-history 161c161 < "\ep": non-incremental-reverse-search-history --- > "\M-p": non-incremental-reverse-search-history 167,168c167,168 < "\e=": possible-completions < "\e?": possible-completions --- > "\M-=": possible-completions > "\M-?": possible-completions 174,175c174,175 < "\eOA": previous-history < "\e[A": previous-history --- > "\M-OA": previous-history > "\M-[A": previous-history 179,180c179 < "\e[2~": quoted-insert < # redraw-current-line (not bound) --- > "\M-[2~": quoted-insert 181a181 > # redraw-current-line (not bound) 183,184c183,184 < "\e\C-r": revert-line < "\er": revert-line --- > "\M-\C-r": revert-line > "\M-r": revert-line 409c409 < "\e ": set-mark --- > "\M- ": set-mark 412c412 < "\e\C-e": shell-expand-line --- > "\M-\C-e": shell-expand-line 418c418 < "\e&": tilde-expand --- > "\M-&": tilde-expand 420c420 < "\et": transpose-words --- > "\M-t": transpose-words 428c428 < "\eu": upcase-word --- > "\M-u": upcase-word 431a432 > # vi-bWord (not bound) 436d436 < # vi-bWord (not bound) 444a445 > # vi-eWord (not bound) 450c451 < # vi-eWord (not bound) --- > # vi-fWord (not bound) 456d456 < # vi-fWord (not bound) 480,483c480,483 < "\e.": yank-last-arg < "\e_": yank-last-arg < "\e\C-y": yank-nth-arg < "\ey": yank-pop --- > "\M-.": yank-last-arg > "\M-_": yank-last-arg > "\M-\C-y": yank-nth-arg > "\M-y": yank-pop
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;3 5:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36: LANG=es_AR.UTF-8 HUSHLOGIN=FALSE USER=testbash PWD=/home/testbash HOME=/home/testbash MAIL=/var/mail/testbash SHELL=/bin/bash TERM=linux SHLVL=1 LANGUAGE=es_AR:es LOGNAME=testbash PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games _=/usr/bin/env
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;3 5:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36: drop_caps= INIT_VERSION=sysvinit- CONSOLE=/dev/console USER=testbash PWD=/home/testbash PREVLEVEL=N HOME=/home/testbash UID=1002 init=/sbin/init BOOT_IMAGE=Linux edd=off SHELL=/bin/bash TERM=linux rootmnt=/root RUNLEVEL=2 SHLVL=2 LOGNAME=testbash PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games AUTOBOOT=YES _=/usr/bin/env