Writer Bug? Paste special characters

When I paste text from other programs into Writer, then writer inserts the wrong characters. It doesn’t matter if I copy from a PDF file or some clear text file.

Example:

How do I fix this problem?

Libreoffice:
Version: 6.4.6.2
Build ID: 1:6.4.6-0ubuntu0.20.04.1
CPU threads: 12; OS: Linux 5.4; UI render: default; VCL: kf5;
Locale: da-DK (da_DK.UTF-8); UI-Language: en-US

My System:
OS: Ubuntu 20.04.2 LTS x86_64 (Kubuntu)
Host: 20M9CTO1WW ThinkPad P52
Kernel: 5.4.0-65-generic
Shell: bash 5.0.17
DE: Plasma
WM: KWin
WM Theme: Breeze
Theme: Breeze [Plasma], Breeze [GTK2/3]
Terminal: konsole

(condensed for better readability by @Lupp.)

Edit 1:

In youtube: please choose > 1080p (good quality), to avoid blur. When it is set to sharp settings, you can use Ctrl+scrollwhell to zoom in.

Screenshot from Youtube video:

When I try to “Paste Special” I have these options:

C:\fakepath\ksnip_20210209-220611.png

(inline display of screenshots enabled by ajlittoz)

The video is rather blurry; I can’t see where you copy text. What you paste looks like UTF-8 not being understood as Unicode encoding. What is the original document? i.e. what is it? Plain text? ISO-8859-x? What is the application you’re copying from?

Are you sure the source application sends UTF-8 to the clipboard? What does Edit>Paste Special>Paste Special say about the formats in the clipboard?

Please do not use Add Answer but edit your original question to enhance the details of your question (answers are reserved for solutions to a problem on this Q&A site).

I have updated my question

Something to with Kubuntu? Similar question 284021 in December

Should the Language not be set to Danish not American? What keyboard settings have you got? Can you enter the character directly in LibreOffice? Remember that English (US) will not have the same special character settings key settings as English (GB) or Danish.

Since you seem to be using Kate, check in Tools>Encoding>… which encoding in in effect in the editor (though it claims UTF-8 on the screenshot).

From what I can see, the clipboard contains raw text (without any formatting directives), i.e. a sequence of bytes. Apparently, it is a UTF-8 sequence (8-bit Unicode encoding).

For an unknown reason, Writer considers this is an ISO-8859-x sequence. Taking the example of å = U+00E5, it is encoded as 0xC3 0xA5 but understood as U+00C3 U+00A5 resulting in the two characters displayed.

The application at left pretends it is UTF-8 but Writer understands ISO-8859-x and converts to Unicode. As there is no setting in Writer to constrain paste as unformatted text, check in the other application (which is it?) that encoding is really set to Unicode and not ISO-8859-x in some menu (despite display in the status bar).

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

Thanks. That makes sence. But is there some kind of solution to this? Or workaround?

Could I possible write a little python program, that can convert from one to the other? Can you please help me in the right direction, what search term on google would help? What page/article/tutorial show how to convert this? a link to a stackoverflow?

I guess it should work like this:

  1. copy from app A
  2. Run python converter script, and copy the converted text into memory
  3. paste the converted text into Writer…