WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
35635
[Qt] copy and paste greek symbols to Word, TextEdit results in ?'s being shown
https://bugs.webkit.org/show_bug.cgi?id=35635
Summary
[Qt] copy and paste greek symbols to Word, TextEdit results in ?'s being shown
Tor Arne Vestbø
Reported
2010-03-03 03:17:08 PST
This bug report originated from issue QTBUG-8429
http://bugreports.qt.nokia.com/browse/QTBUG-8429
--- Description --- I'm not sure if this is a Qt or a webkit issue, and there is a Qt twist, so I'm posting it here: <p>-create an editable QWebView<br/> -insert some greek letters (e.g. αβγδεζηθικλμπ)<br/> -select them<br/> -do a Copy<br/> -open up Word or TextEdit.app and paste</p> <p>You get ?'s, instead of the greek letters. Strangly other editors, like QtCreator and Smultron have no trouble displaying them.</p> <p>Theory: the data is on the clipboard just fine, but the encoding is not being included.</p> <p>I found a hacky workaround: use QClipboard to push the data back on again like so:</p> <p> //something is goofy with the encoding, so copy again using QClipboard directly...<br/> qApp->clipboard()<del>>setText( qApp</del>>clipboard()->text() );</p> <p>This actually works, but in order to trap a slew of copy calls you have to do stuff like reimplement QWebView's keyPressEvent function.</p>
Attachments
Patch
(2.56 KB, patch)
2010-12-12 09:04 PST
,
Jan Erik Hanssen
no flags
Details
Formatted Diff
Diff
Patch
(4.21 KB, patch)
2010-12-22 12:24 PST
,
Jan Erik Hanssen
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Kent Hansen
Comment 1
2010-03-16 06:05:17 PDT
Reproduced with
r55986
,
http://html5demos.com/contenteditable
Jan Erik Hanssen
Comment 2
2010-12-12 08:58:39 PST
This is caused by Pasteboard::writeSelection() calling QMimeData::setHtml() and there's two separate issues involved here. 1) QMacPasteboardMimeAny::convertFromMime() returns UTF-8 data only for text/plain, not text/html. Not sure if this is intended or not but I don't think it can be changed in Qt without breaking existing code. 2) HTML on the Pasteboard on OS X needs to be explicitly told that it contains unicode data (i.e. using a <meta> tag). I'll upload a patch shortly that fixes this.
Jan Erik Hanssen
Comment 3
2010-12-12 09:04:12 PST
Created
attachment 76329
[details]
Patch
Eric Seidel (no email)
Comment 4
2010-12-13 00:43:01 PST
Comment on
attachment 76329
[details]
Patch Seems you'd want to share more code with PasteboardMac here. :(
Eric Seidel (no email)
Comment 5
2010-12-13 00:43:37 PST
Comment on
attachment 76329
[details]
Patch We really need a better way of testing clipboard tests like this.
Jan Erik Hanssen
Comment 6
2010-12-13 01:37:43 PST
(In reply to
comment #5
)
> (From update of
attachment 76329
[details]
) > We really need a better way of testing clipboard tests like this.
Agreed. This particular one would be hard to test though since this bug only happens when copying from QtWebKit and pasting to a non-Qt program so I don't see how this could be tested without launching an external application.
Jan Erik Hanssen
Comment 7
2010-12-22 12:24:14 PST
Created
attachment 77245
[details]
Patch Change the manual test case in the previous test to an autotest for Qt which checks that QClipboard contains the selected unicode data and also verifies that the clipboard data contains the charset information
Ariya Hidayat
Comment 8
2010-12-22 15:10:51 PST
> Seems you'd want to share more code with PasteboardMac here. :(
This bug is caused by Qt-specific handling in its QClipboard abstraction.
Andreas Kling
Comment 9
2010-12-23 11:43:03 PST
Comment on
attachment 77245
[details]
Patch Looks sane enough to me.
WebKit Commit Bot
Comment 10
2010-12-23 13:07:09 PST
The commit-queue encountered the following flaky tests while processing
attachment 77245
[details]
: http/tests/appcache/local-content.html
bug 51558
(author:
ap@webkit.org
) The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 11
2010-12-23 13:08:25 PST
Comment on
attachment 77245
[details]
Patch Clearing flags on attachment: 77245 Committed
r74577
: <
http://trac.webkit.org/changeset/74577
>
WebKit Commit Bot
Comment 12
2010-12-23 13:08:32 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug