Hello,
I'm using: PyQt4, OS X 10.7.5
My system has fonts to display both unicode characters 0x1200 and 0x1250 (that is, both glyphs display fine in Mac's character viewer).
However, with PyQt, I'm getting some strange behaviour. For example:
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
Created on 19 November 2012
@author: nick
'''
import sys
from PyQt4.QtWebKit import QWebView
# Constants
HTML = u"<html><body>++؀؀\u1250++</body></html>"
# Main
widget.resize(320, 240)
widget.setWindowTitle("Hello, World!")
widget.show()
webView = QWebView(widget);
webView.setHtml(HTML);
webView.show()
sys.exit(app.exec_())
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
Created on 19 November 2012
@author: nick
'''
import sys
from PyQt4.QtGui import QApplication, QWidget
from PyQt4.QtWebKit import QWebView
# Constants
HTML = u"<html><body>++؀؀\u1250++</body></html>"
# Main
app = QApplication(sys.argv)
widget = QWidget()
widget.resize(320, 240)
widget.setWindowTitle("Hello, World!")
widget.show()
webView = QWebView(widget);
webView.setHtml(HTML);
webView.show()
sys.exit(app.exec_())
To copy to clipboard, switch view to plain text mode
displays the correct character in the window, but if I change the HTML string to:
HTML = u"<html><body>++؀؀\u1200++</body></html>"
HTML = u"<html><body>++؀؀\u1200++</body></html>"
To copy to clipboard, switch view to plain text mode
only "++<empty box>++" displays.
Why might this be?
Bookmarks