Bug 501130 - Selecting Clipboard history items with non-Latin characters, then pasting, results in escaped numeric references replacing the characters
Summary: Selecting Clipboard history items with non-Latin characters, then pasting, re...
Status: RESOLVED DUPLICATE of bug 500203
Alias: None
Product: plasmashell
Classification: Plasma
Component: Clipboard widget & pop-up (show other bugs)
Version: 6.3.2
Platform: Manjaro Linux
: HI grave
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-06 06:22 UTC by Daniil
Modified: 2025-03-16 13:17 UTC (History)
4 users (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 Daniil 2025-03-06 06:22:05 UTC
SUMMARY
If you copy a text that is not written in Latin, you can paste it into another application. But if you go back to the same text in the clipboard history after a while (click on the entry and make it relevant), then the non-English text message is replaced by an escape sequence. For example, this is how the inserted text with Ukrainian and English characters looks like: 
```
Test \u0442\u0435\u0441\u0442
```
At the same time, the text is displayed normally in the Clipboard History. When you click "Edit", the text is also displayed normally, but when pasted, the escape sequence is replaced.
This behavior appeared after yesterday's Manjaro update.

STEPS TO REPRODUCE
1. Copy text with Cyrillic characters.
2. Copy another text.
3. Go back to the original text in the clipboard History.
4. Insert it into any application.

OBSERVED RESULT
The text has been replaced with an escape sequence

EXPECTED RESULT
Behavior as before the update

SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux 
KDE Plasma Version: 6.3.2
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2
Kernel Version: 6.12.17-1-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 6800H with Radeon Graphics
Memory: 13.3 ГиБ of RAM
Graphics Processor: AMD Radeon Graphics
Manufacturer: TIMI
Product Name: Redmi Book Pro 15 2022
Comment 1 Nate Graham 2025-03-07 16:52:04 UTC
Can you provide some example text we can copy to test it?

Does this happen in a new clean user account on the same system?
Comment 2 Daniil 2025-03-08 09:52:58 UTC
(In reply to Nate Graham from comment #1)
> Can you provide some example text we can copy to test it?
> 
> Does this happen in a new clean user account on the same system?

Yes, the problem persists in the new account. 
Source text: "Test тест".
Copied and pasted text: "Test тест".
I went back to the text in the clipboard history and pasted: "Test \u0442\u0435\u0441\u0442".
Comment 3 John Kizer 2025-03-10 18:21:30 UTC
I think this might have been accidentally set to the status Resolved/Waitingforinfo - Nate please override if I'm wrong there.
Comment 4 John Kizer 2025-03-10 18:26:53 UTC
I can reproduce that the first time I select such an item in the clipboard history, it pastes the numeric references to the Unicode characters, instead of the characters themselves. If I go back and re-select the same entry, it then subsequently pastes normally.

This is on Fedora KDE 41, Plasma 6.3.2. I tried both KWrite and Firefox as the destinations to paste into, both giving the same results.
Comment 5 Roke Julian Lockhart Beedell 2025-03-10 18:52:06 UTC
(In reply to John Kizer from comment #4)  
> I can reproduce that the first time I select such an item in the clipboard history, it pastes the numeric references to the Unicode characters, instead of the characters themselves. If I go back and re-select the same entry, it then subsequently pastes normally.

I somehow see the opposite, per [`discuss.kde.org/t/31282`][1] – when I initially copy a character, I am able to paste it. However, regarding the undermentioned:

(In reply to Daniil from comment #0)  
> "Selecting Clipboard history items with non-Latin characters, then pasting, *sometimes* results in escaped numeric references replacing the characters."

...it, then, *always* pastes the code point. It's consistently reproducible.

[1]: https://discuss.kde.org/t/pasting-non-ascii-utf-characters-from-klippers-history-pastes-those-characters-code-points/31282?u=rokejulianlockhart
Comment 6 Daniil 2025-03-10 19:25:35 UTC
(In reply to John Kizer from comment #3)
> Resolved/Waitingforinfo - Nate please override if I'm wrong there.

Yes, the error continues to be reproduced.
I tried a complete reinstall of Plasma while saving the configs. The error also remained on the new clean user after reinstalling.
Comment 7 Roke Julian Lockhart Beedell 2025-03-10 19:30:03 UTC
(In reply to Daniil from comment #6)  
Likewise. Reproduces across 2 installations of F41's KDE Spin.
Comment 8 Nate Graham 2025-03-11 21:15:03 UTC
I can also reproduce this.
Comment 9 John Kizer 2025-03-16 13:17:53 UTC
Sorry, I had missed before that there is an existing bug report, with some development activity around it, that is tackling this same root issue (it had referenced a particular application, but I believe it generally applies).

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