Bug 341657 - klipper starts replacing binary text with the UTF-8 replace character (0xEF 0xBF 0xBD) until restarted
Summary: klipper starts replacing binary text with the UTF-8 replace character (0xEF 0...
Status: RESOLVED UNMAINTAINED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Clipboard widget & pop-up (show other bugs)
Version: 5.15.3
Platform: Mageia RPMs Linux
: NOR normal
Target Milestone: 1.0
Assignee: Martin Flöser
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-08 15:14 UTC by Martin Ward
Modified: 2023-08-10 20:07 UTC (History)
1 user (show)

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 Martin Ward 2014-12-08 15:14:43 UTC
I use XEmacs with the X-Symbol package to edit LaTeX files with cut and paste in XEmacs  via the clipboard.

At some point, klipper suddenly starts interpreting the text as UTF-8: so any "unrecognised" binary characters (with the top bit set) get replaced by the UTF-8 "replace" character which is the three byte sequence xEF 0xBF 0xBD.

For example, the following is a hex dump of "xclip -o" for some XEmacs selected text:

000000: 9a f2 20 9a c8 20 78            .. .. x

when klipper gets into this strange state, the above text comes out as:

000000: ef bf bd ef bf bd 20 ef bf bd   ...... ...
000010: ef bf bd 20 78                  ... x

As you can see, the three binary characters have been replaced by the sequence "ef bf bd".

Quitting and restarting klipper restores normal functionality: cutting and pasting the same piece of text in the same file now works correctly.

Sorry, but I have not been able to find a way to reproduce the problem reliably!

If anyone can suggest tests I can apply next time the situation occurs, I would be happy to help.


Reproducible: Sometimes

Steps to Reproduce:
1. Use XEmacs with X-Symbol to cut/paste binary text
2. Keep working until the problem appears :-(


Actual Results:  
At some point, binary characters (i.e. with the top bit set) start getting replaced by the UTF-8 replace character (the three byte sequence "ef bf bd")

Expected Results:  
Binary characters are preserved "as is" in the clipboard.

Restarting klipper fixes the problem: until it occurs again.
Comment 1 Martin Ward 2014-12-09 15:56:44 UTC
More information: The bug manifested itself again today. I tried selecting "Clear clipboard history" in the klipper menu, selecting the text again in XEmacs and pasting it via middle click. The first paste worked (pasting the correct text), but an immediate second paste of the same selection inserted the corrupted text (with binary characters replaced by "ef bf bd" sequences).

Restarting klipper fixed it: I can copy and paste the same binary text as often as I want.
Comment 2 Noah Davis 2023-08-10 20:07:35 UTC
This bug is likely for some version of Plasma 4, not 5.15.3. so I'm marking this as resolved unmaintained. If anyone has an issue similar to this one, please make a new report for the latest version of Plasma.