[QScintilla] QScintilla issue

Detlev Offenbach detlev at die-offenbachs.de
Fri Aug 13 10:13:53 BST 2010


On Donnerstag, 12. August 2010, Detlev Offenbach wrote:
> Hi,
> 
> I am observing an issue with QScintilla when it has to handle "strange"
> characters like German umlauts or Chines characters. Enter the following in
> a Python (2 or 3) console to reproduce it.
> 
> Python 3.1 (r31:73572, Jul  5 2010, 13:31:53)
> [GCC 4.5.0 20100604 [gcc-4_5-branch revision 160292]] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> 
> >>> from PyQt4.QtGui import QApplication
> >>> from PyQt4.Qsci import QsciScintilla
> >>> app = QApplication([])
> >>> s = QsciScintilla()
> >>> e = "a"
> >>> s.SendScintilla(QsciScintilla.SCI_SEARCHINTARGET, len(e), e)
> 
> -1
> 
> >>> e = "ä"
> >>> s.SendScintilla(QsciScintilla.SCI_SEARCHINTARGET, len(e), e)
> 
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> TypeError: arguments did not match any overloaded call:
>   QsciScintillaBase.SendScintilla(int, int wParam=0, int lParam=0):
> argument 3 has unexpected type 'str'
>   QsciScintillaBase.SendScintilla(int, int, sip.voidptr): argument 3 has
> unexpected type 'str'
>   QsciScintillaBase.SendScintilla(int, int, str): argument 3 has unexpected
> type 'str'
>   QsciScintillaBase.SendScintilla(int, str): argument 2 has unexpected type
> 'int'
>   QsciScintillaBase.SendScintilla(int, str, str): argument 2 has unexpected
> type 'int'
>   QsciScintillaBase.SendScintilla(int, int): too many arguments
>   QsciScintillaBase.SendScintilla(int, int, int, str): argument 3 has
> unexpected type 'str'
>   QsciScintillaBase.SendScintilla(int, int, QColor): argument 3 has
> unexpected type 'str'
>   QsciScintillaBase.SendScintilla(int, QColor): argument 2 has unexpected
> type 'int'
>   QsciScintillaBase.SendScintilla(int, int, QPainter, QRect, int, int):
> argument 3 has unexpected type 'str'
>   QsciScintillaBase.SendScintilla(int, int, QPixmap): argument 3 has
> unexpected type 'str'
> 
> 
> Regards,
> Detlev

The issue does not happen, if the string is encoded first (i.e. 
e='ä'.encode('utf-8') ).

Regards,
Detlev
-- 
Detlev Offenbach
detlev at die-offenbachs.de


More information about the QScintilla mailing list