From 3a9801d568e2f7d5a95ed4f5886a7f5062869456 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Mon, 12 Dec 2016 13:35:30 +0100 Subject: doc: Specify which characters are replaced by toPlainText() Some formatting characters are replaced by ASCII in the output from toPlainText(). Since this is a bit inconsistent, we should document it. Task-number: QTBUG-57552 Change-Id: I46033588d37517056a8d4668d1d16d48c72ee1b5 Reviewed-by: Lars Knoll --- src/gui/text/qtextdocument.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/gui/text/qtextdocument.cpp') diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index 0d05fee6ef..c006e7f427 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -1148,6 +1148,11 @@ void QTextDocument::setMetaInformation(MetaInformation info, const QString &stri Returns the plain text contained in the document. If you want formatting information use a QTextCursor instead. + Some formatting characters are replaced by ASCII equivalents. + In particular, no-break space (U+00A0) is replaced by a regular + space (U+0020), and both paragraph (U+2029) and line (U+2028) + separators are replaced by line feed (U+000A). + \note Embedded objects, such as images, are represented by a Unicode value U+FFFC (OBJECT REPLACEMENT CHARACTER). -- cgit v1.2.3