For historical reasons, QTextDocument[Fragment]::toPlainText replaces
nbsp character (U+00A0) with a normal space, and U+2029, and U+2028
characters with a line feed character.
This behavior differs from native (plain) text editors. It also creates
an asymetry, because the characters in question can be pasted into the
document, but not copied out of it.
Use the newly introduced QTextDocumentFragment::toRawText()
to avoid this conversion.
[ChangeLog][QtGui][Drag&Drop] Special characters like are now
preserved in the text/plain part of the clipboard when copied from
a QTextEdit or QLineEdit.
Fixes: QTBUG-99572
Change-Id: If01a5dd98127a59be15a425dc029c7303bce18f1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>