Bug 240929

Summary: Konsole converts tabs to spaces on copy/paste
Product: [Applications] konsole Reporter: Ken Bloom <kbloom>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED DUPLICATE    
Severity: normal CC: adaptee, airdrik, greg.martyn
Priority: NOR    
Version: 2.4.3   
Target Milestone: ---   
Platform: Debian unstable   
OS: Linux   
Latest Commit: Version Fixed In:

Description Ken Bloom 2010-06-06 20:11:32 UTC
Version:           2.4.3 (using KDE 4.4.3) 
OS:                Linux

Konsole copies tab characters as spaces. This makes pasting
tabularly-formatted data into OpenOffice difficult.

To reproduce:
echo -e "a\tb"

Copy the resulting output

run xxd, and paste the resulting output on the console (into xxd's
standard input)

[bloom@zuni CORPUS_huliu]$ echo -e "a\tb"
a       b
[bloom@zuni CORPUS_huliu]$ xxd
a       b
0000000: 6120 2020 2020 2020 620a                 a       b.

If I perform the same test in rxvt, it copies tabs as tabs:

[bloom@cat-in-the-hat ~]$ echo -e "a\tb"
a	b
[bloom@cat-in-the-hat ~]$ xxd
a	b
0000000: 6109 620a


This is Debian bug http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=583232
It's also previously been reported as https://bugs.kde.org/show_bug.cgi?id=146146. You closed that bug because you said that the bug occurs somewhere lower in the software stack, and you can't fix it in Konsole. Since rxvt shows the correct behavior, I believe that the assessment you gave in that bug is incorrect, and that RXVT's behavior demonstrates that the bug is fixable in konsole. Please look into this again.

--Ken Bloom

Reproducible: Always
Comment 1 Eric Francis 2011-06-03 17:21:26 UTC
Different terminal emulators handle this differently.
Testing using just the echo command and then selecting the text, the following emulators displayed individually-selectable spaces:
aterm, eterm, rxvt, xterm, Konsole
The following emulators displayed tabs as a single multiple-character-width character:
rxvt-unicode, Terminal (xfce's), gnome-terminal.

This seems like an artifact of old terminal emulation which konsole hasn't forsaken for a more modern convention especially when compared to the handling of double-width characters.
Comment 2 Jekyll Wu 2011-07-30 21:30:32 UTC

*** This bug has been marked as a duplicate of bug 168368 ***