diff -r df9541c07045 -r 614babee9ae9 QScintilla/Lexers/LexerPygments.py --- a/QScintilla/Lexers/LexerPygments.py Sat Oct 16 21:01:28 2010 +0200 +++ b/QScintilla/Lexers/LexerPygments.py Wed Oct 20 08:40:46 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: