#999: Using unicode(c) instead of str(c) to avoid exception when unicode string contains high byte chars
This commit is contained in:
parent
66bd976cd1
commit
e5f011a9a1
|
@ -320,7 +320,7 @@ class Lexer(Recognizer, TokenSource):
|
|||
elif c=='\r':
|
||||
return "\\r"
|
||||
else:
|
||||
return str(c)
|
||||
return unicode(c)
|
||||
|
||||
def getCharErrorDisplay(self, c):
|
||||
return "'" + self.getErrorDisplayForChar(c) + "'"
|
||||
|
|
Loading…
Reference in New Issue