QScintilla/Lexers/LexerPygments.py

changeset 684
2f29a0b6e1c7
parent 167
7508e44f4853
child 791
9ec2ac20e54e
diff -r 91114a975eda -r 2f29a0b6e1c7 QScintilla/Lexers/LexerPygments.py
--- a/QScintilla/Lexers/LexerPygments.py	Sat Oct 16 20:28:00 2010 +0200
+++ b/QScintilla/Lexers/LexerPygments.py	Wed Oct 20 08:39:56 2010 +0200
@@ -376,7 +376,7 @@
             for token, txt in self.__lexer.get_tokens(text):
                 style = TOKEN_MAP.get(token, PYGMENTS_DEFAULT)
                 
-                tlen = len(txt)
+                tlen = len(txt.encode('utf-8'))
                 if eolLen > 1:
                     tlen += txt.count('\n')
                 if tlen:

eric ide

mercurial