https://bugs.kde.org/show_bug.cgi?id=500203
Bug ID: 500203 Summary: Pasting Unicode text in clipboard history that was previously copied from Firefox would output incorrect characters Classification: Plasma Product: plasmashell Version: 6.3.0 Platform: Arch Linux OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: Clipboard widget & pop-up Assignee: plasma-b...@kde.org Reporter: yule2...@live.com Target Milestone: 1.0 SUMMARY When pasting Unicode (non-ANSI/ASCII) characters from the clipboard history, the pasted output appears with such characters being replaced with a black diamond with a question mark or "\uXXXX". STEPS TO REPRODUCE 1. Copy a snippet of non-Latin text or symbols from a webpage in Firefox (e.g., https://gist.github.com/StevenACoffman/a5f6f682d94e38ed804182dc2693ed4b) 2. Do one of the following: (a) Copy another piece of text from any app or (b) open the clipboard history popup and select an item other than the top one on the list 4. In the clipboard history popup, select the second item from the top of the list 5. Paste to a text box in any app OBSERVED RESULT The output would have Unicode characters replaced with either a � or something like "\u0105". However, those characters appear fine in both the clipboard history popup and the database file containing the clipboard items. Using the contents of the above link as an example, "а ạ ą ä à á ą" from the clipboard history would be pasted as "\u0430 \u1ea1 \u0105 � � � \u0105" EXPECTED RESULT The pasted text would have characters exactly as displayed in the clipboard history popup, with or without formatting depending on the app. SOFTWARE/OS VERSIONS Operating System: EndeavourOS KDE Plasma Version: 6.3.0 KDE Frameworks Version: 6.10.0 Qt Version: 6.8.2 Graphics Platform: Wayland ADDITIONAL INFORMATION This behavior started in Plasma 6.3.0; I never encountered this in prior versions. Sometimes, if you paste the history item to a textbox in Firefox, it would output nothing. I found that in the new SQLite-based database containing the clipboard items (mine was located at ~/.local/share/klipper/history3.sqlite), the affected items would have something like this in the mimetype column: ``` text/html,text/_moz_htmlcontext,text/_moz_htmlinfo,text/plain;charset=utf-8,UTF8_STRING,COMPOUND_TEXT,TEXT,text/plain,STRING,text/plain;charset=ANSI_X3.4-1968,text/x-moz-url-priv ``` A workaround is to edit the affected item by adding/removing characters from within the clipboard history popup. This changes the MIME type for that specific item in the database to "text/plain,text/plain;charset=utf-8", causing Unicode characters in that snippet to be pasted with the correct characters at the expense of any formatting being lost. -- You are receiving this mail because: You are watching all bug changes.