#999: Using unicode(c) instead of str(c) to avoid exception when unicode string contains high byte chars

This commit is contained in:
Rajiv Subrahmanyam 2015-09-17 22:23:10 -07:00
parent 66bd976cd1
commit e5f011a9a1
1 changed files with 1 additions and 1 deletions

View File

@ -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) + "'"