Bug 489882 - Konsole leaves behind old characters in text/html clipboard
Summary: Konsole leaves behind old characters in text/html clipboard
Status: REPORTED
Alias: None
Product: konsole
Classification: Applications
Component: copy-paste (show other bugs)
Version: 23.08.5
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-07 15:31 UTC by Thomas Lindroth
Modified: 2024-07-07 15:31 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Lindroth 2024-07-07 15:31:43 UTC
If I select the text "1234" in Konsole and run "xclip -out -target text/html" I get the following output:
<span style="font-family:monospace"><span style="color:#000000;background-color:#ffffff;">1234</span><br></span>

That is correct, but if I now select a single double-width character such as the Japanese character "私" and run xclip again I get this:
<span style="font-family:monospace"><span style="color:#000000;background-color:#ffffff;">私2</span><br></span>

The number "2" now appears after "私". This number is left behind from the previous clipboard entry because Konsole gets confused about the length of the clipboard when it contains double-width characters.

I am running Konsole 23.08.5 with Qt 5.15.14 on X11 Linux.