Activity log for bug #394570

Date Who What changed Old value New value Message
2009-07-02 05:37:46 AZaharia bug added bug
2009-07-02 16:19:36 AZaharia description Binary package hint: openssh-client This is not a terminal-related problem: regardless of the terminal used and the way the backspace key is supposed to behave (ASCII DEL, escape sequence, Control+H), what happens is that via SSH the backspace key only deletes the last byte of a character, not the whole character itself. You can notice this when you use UTF-8 characters that are encoded on more than 1 byte. Some diacritics from the Latin alphabet are encoded on 2 bytes, whereas some Japanese characters are encoded on 3. As an example, assume the following scenario: the letter "ș" is encoded as "c8 99" and endline is encoded as "0a": user@host:~$ cat > ș.txt ș ^d user@host:~$ hexdump -C ș.txt 00000000 c8 99 0a |...| 00000003 Now, assume you write "testș[hit backspace]test[endline]". On the physical host (i.e. without being SSH-ed into it), the hexdump of that file will be: user@host:~$ cat > test.txt testș[backspace]test ^d user@host:~$ hexdump -C test.txt 00000000 74 65 73 74 74 65 73 74 0a |testtest.| 00000009 whereas the *same* thing via SSH would lead you to having the following hexdump: user@host:~$ ssh user@localhost user@localhost's password: user@host:~$ cat > test.txt testș[backspace]test ^d user@host:~$ hexdump -C test.txt 00000000 74 65 73 74 c8 74 65 73 74 0a |test.test.| 0000000a So notice how backspace only deleted via SSH the last byte of "ș" i.e. only the "99" out of "c8 99"; compare the expected hexdump: 74 65 73 74 74 65 73 74 0a with the actual hexdump: 74 65 73 74 c8 74 65 73 74 0a locale is set to en_US.UTF-8; changing it to ro_RO.UTF-8 (both on the host and via SSH) yields the same results. Finally, last details: Ubuntu 9.04 Kernel 2.6.28-13-generic openssh-client: Installed: 1:5.1p1-5ubuntu1 openssh-server: Installed: 1:5.1p1-5ubuntu1 Binary package hint: openssh-client This is not a terminal-related problem: regardless of the terminal used and the way the backspace key is supposed to behave (ASCII DEL, escape sequence, Control+H), what happens is that via SSH the backspace key only deletes the last byte of a character, not the whole character itself. You can notice this when you use UTF-8 characters that are encoded on more than 1 byte. Some diacritics from the Latin alphabet are encoded on 2 bytes, whereas some Japanese characters are encoded on 3. As an example, assume the following scenario: the letter "ș" is encoded as "c8 99" and endline is encoded as "0a": user@host:~$ cat > ș.txt ș ^d user@host:~$ hexdump -C ș.txt 00000000 c8 99 0a |...| 00000003 Now, assume you write "testș[hit backspace]test[endline]". On the physical host (i.e. without being SSH-ed into it), the hexdump of that file will be: user@host:~$ cat > test.txt testș[backspace]test ^d user@host:~$ hexdump -C test.txt 00000000 74 65 73 74 74 65 73 74 0a |testtest.| 00000009 whereas the *same* thing via SSH would lead you to having the following hexdump: user@host:~$ ssh user@localhost user@localhost's password: user@host:~$ cat > test.txt testș[backspace]test ^d user@host:~$ hexdump -C test.txt 00000000 74 65 73 74 c8 74 65 73 74 0a |test.test.| 0000000a So notice how backspace only deleted via SSH the last byte of "ș" i.e. only the "99" out of "c8 99"; compare the expected hexdump: 74 65 73 74 74 65 73 74 0a with the actual hexdump: 74 65 73 74 c8 74 65 73 74 0a locale is set to en_US.UTF-8; changing it to ro_RO.UTF-8 (both on the host and via SSH) yields the same results. Finally, last details: Ubuntu 9.04 Kernel 2.6.28-13-generic openssh-client: Installed: 1:5.1p1-5ubuntu1 openssh-server: Installed: 1:5.1p1-5ubuntu1 L.E.: I also tried the same thing using dropbear instead of OpenSSH.
2009-10-14 13:37:29 Chuck Short openssh (Ubuntu): importance Undecided Low
2009-10-14 13:37:29 Chuck Short openssh (Ubuntu): status New Incomplete
2009-11-30 14:25:08 Chuck Short openssh (Ubuntu): status Incomplete Confirmed
2010-03-06 03:39:28 Colin Watson bug watch added http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=337041
2010-03-06 03:39:28 Colin Watson bug task added openssh (Debian)
2010-03-06 03:39:46 Colin Watson openssh (Ubuntu): status Confirmed Triaged
2010-03-31 21:41:52 Bug Watch Updater openssh (Debian): status Unknown New
2010-03-31 21:41:55 Bug Watch Updater bug watch added http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=319237
2010-05-09 16:32:59 Colin Watson summary Backspace via SSH only deletes last byte of characters Backspace via SSH only deletes last byte of characters (no IUTF8 handling, requires standardisation work)
2016-08-08 10:46:37 Bug Watch Updater openssh (Debian): status New Fix Released
2016-08-09 11:09:11 Launchpad Janitor openssh (Ubuntu): status Triaged Fix Released