diff options
author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2016-10-26 11:19:19 +0200 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2016-10-26 12:14:23 +0000 |
commit | 4e196159077a820e99bc8bd306d31d0ccaa17c57 (patch) | |
tree | a91536c15d54a742921878d04759f17a67213e63 /src/concurrent/qtconcurrentmap.h | |
parent | e8b55a6d2a6e44337b75dd0d116b1b020a437631 (diff) |
qmacmime: convert UTF-16 using QTextCodec
The current implementation of QMacPasteboardMimeUnicodeText
didn't contain any logic to handle unicode text with a byte
order mark (BOM). According to the
docs (*), 'public.utf16-plain-text' can have an optional BOM.
Because of that, Qt would fail encoding UTF-16 text from the
pasteboard if it had a BOM.
Additionally, perhaps because of a bug in iOS 10, UTF-16 text
placed on the pasteboard by Qt ends up being encoded wrong by
native apps, unless the text has a BOM.
Rather than hard-coding UTF-16 encoding/decoding in qmacmime, we
now leave it to QTextCodec. QTextCodec will add a BOM by
default, and can handle decoding of UTF-16 both with, and
without, a BOM.
*: https://developer.apple.com/library/content/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html
Task-number: QTBUG-56229
Change-Id: I3a08deb0262350c67e5622cf23eb3c3a4907ec39
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/concurrent/qtconcurrentmap.h')
0 files changed, 0 insertions, 0 deletions