Hi folks,<br><br>I'm trying to display a unicode string in a QMessageBox using the information() static method. However it seems to only accept ascii characters. I'm using qt/pyqt 4.3.0 on Windows.<br><br>Here's a sample app with output:
<br><br># *-* coding: utf-8 *-*<br>from PyQt4 import QtCore, QtGui<br>from PyQt4.QtCore import *<br>from PyQt4.QtGui import *<br><br>if __name__ == "__main__":<br> qapp = QApplication([])<br> QMessageBox.critical
(None, "ImportError", unicode("blort español"))<br> sys.exit(qapp.exec_())<br><br>********************************************************<br><br>Traceback (most recent call last):<br> File "U:\dev\delphos\src\gui\test.py", line 8, in <module>
<br> QMessageBox.critical(None, "ImportError", unicode("blort español"))<br>UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 10: ordinal not in range(128)<br><br>*********************************************************
<br><br>Removing the ñ creates a working message box. It makes no difference if I use the static method or create and setup a QMessageBox object myself. Any help is appreciated, I found no mention of this in any documentation or the archives.
<br><br>Tim<br>