ms-wordtext-editorcopy-pastequotesqtruby

QTextEditor returns quotes as question marks in QT Ruby


When I copy and paste from a Word document into a QT TextEditor, It seems to look fine. But when I try to access the text using toPlainText or toHTML, it returns the text with all of the quotes (double and single) as question marks. Is there a way around this? I am using the qt4-qtruby bindings.


Solution

  • That's because the quotes used in Word aren't actually ASCII quote characters - They are some kind of funky unicode character that kind of looks like a quote.

    For HTML, if you use UTF-8 encoding, it should work fine. For plain text though you're pretty much out of luck.

    Here's a nice page with some more info