Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
6.2.2
-
None
-
17eb0f2d8a (qt/qtbase/dev) 17eb0f2d8a (qt/tqtc-qtbase/dev)
Description
When copying from a QTextEdit with a non-breaking space character (nbsp,
U+00A0), the character will be replaced by an ordinary whitespace in the "text/plain" mime data.
This is different from other native text editors, at least on Windows; they preserve the character. It also creates an asymetry, because pasting such a character from another plain text editor works fine.
The reason for this behavior is that the default QTextEdit uses QTextDocumentFragment::toPlainText(), which in turn uses QTextDocument::toPlainText(). The latter one is documented to replace U+00A0, U+2029, and U+2028 characters.
A possible fix is to switch to QTextDocument::toRawText(), which avoids these conversions.
Attachments
Issue Links
- is required for
-
QTBUG-99550 Translations in Linguist don't accept non-breaking spaces
- Open
- resulted in
-
QTBUG-107004 Copying from QTextEdit to other program turns newline into paragraph separator (U+2029)
- Closed