From: Stefan Behnel Date: Tue, 13 May 2008 09:32:00 +0000 (+0200) Subject: identifiers are encoded strings X-Git-Tag: 0.9.8rc1~37^2~92 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=70bb2a3e1b9dee1a8135015ea810afe8e4c85fe4;p=cython.git identifiers are encoded strings --- diff --git a/Cython/Compiler/Scanning.py b/Cython/Compiler/Scanning.py index 278b8a73..67016d99 100644 --- a/Cython/Compiler/Scanning.py +++ b/Cython/Compiler/Scanning.py @@ -11,7 +11,7 @@ import stat import sys from time import time -from Cython import Plex +from Cython import Plex, Utils from Cython.Plex import Scanner from Cython.Plex.Errors import UnrecognizedInput from Errors import CompileError, error @@ -320,8 +320,12 @@ class PyrexScanner(Scanner): sy, systring = self.read() except UnrecognizedInput: self.error("Unrecognized character") - if sy == 'IDENT' and systring in self.resword_dict: - sy = systring + if sy == 'IDENT': + if systring in self.resword_dict: + sy = systring + else: + systring = Utils.EncodedString(systring) + systring.encoding = self.source_encoding self.sy = sy self.systring = systring if debug_scanner: