SUMMARY *** When Formats - System Settings is set to certain regions, attempting to copy formatted Unicode text (eg. bold, italics, a hyperlink) and pasting it into LibreOffice as unformatted text will cause the text to end up being garbled gibberish. *** STEPS TO REPRODUCE 1. Under Formats - System Settings, set region to "Belgium - English (en_BE)". (Other regions also cause this issue but for demonstration purposes I am using en_BE.) 2. Log out and log back in so changes would take effect 3. Copy some formatted Unicode text (I went on ja.wikipedia.org and copied the header) 4. Open LibreOffice writer and trigger context menu. Go to Paste Special -> Unformatted Text and select that option. OBSERVED RESULT Text ends up as a nonsensical string of letters EXPECTED RESULT Text is rendered properly ADDITIONAL INFORMATION It appears this is because the text encoding is incorrectly set to ISO-8859 rather than UTF-8, as the garbled string can be produced identically by pasting the same string into Kate and changing the encoding to ISO-8859. This is not an issue with locales such as en_US and en_GB and thus indicates behavior is unintended or at least fixable, hence filing this bug. Issue seems to only affect LibreOffice, however as the bug is triggered by changing region in Plasma settings evidence points to this being on KDE's end.
Created attachment 146128 [details] Demo video
Quick clarification: This actually happens with attempting to paste any string of unicode
Quick clarification: This happens when attempting to copy any string of Unicode text, it's simply that only when the text contains formatting might one wish to "Paste unformatted". Alas, it seems encoding info gets discarded along with it.
What languages do you have set in the Languages page, and what order are they in?
(In reply to Nate Graham from comment #4) > What languages do you have set in the Languages page, and what order are > they in? Only one - American English.
Can you paste the contents of ~/.config/plasma-localerc?
(In reply to Nate Graham from comment #6) > Can you paste the contents of ~/.config/plasma-localerc? [Formats] LANG=en_BE.UTF-8 LC_MEASUREMENT=en_GB.UTF-8 LC_MONETARY=en_GB.UTF-8 LC_NUMERIC=en_GB.UTF-8 LC_TIME=en_GB.UTF-8 useDetailed=true
This has to be a problem in LibreOffice or deeper in the stack, then. All we do is set those variables; we don't play with encodings of anything. Can you report this to the LibreOffice folks at https://bugs.documentfoundation.org? Thanks!
(In reply to Nate Graham from comment #8) > This has to be a problem in LibreOffice or deeper in the stack, then. All we > do is set those variables; we don't play with encodings of anything. > > Can you report this to the LibreOffice folks at > https://bugs.documentfoundation.org? Thanks! Alright, will do. Thanks for the help!