Py2.x fix after Py3 char fix ;)
authorStefan Behnel <scoder@users.berlios.de>
Fri, 21 Aug 2009 08:44:15 +0000 (10:44 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Fri, 21 Aug 2009 08:44:15 +0000 (10:44 +0200)
Cython/Compiler/StringEncoding.py

index dcb5079c67251677b861621cb98f852af3fae8fe..3df6ffcc64540edbea0f34f0665518c8f3307971 100644 (file)
@@ -49,16 +49,16 @@ class BytesLiteralBuilder(object):
         self.chars.append(characters)
 
     def append_charval(self, char_number):
-        self.chars.append( chr(char_number).encode('ISO-8859-1') )
+        self.chars.append( unichr(char_number).encode('ISO-8859-1') )
 
     def getstring(self):
-        # this *must* return a byte string! => fix it in Py3k!!
+        # this *must* return a byte string!
         s = BytesLiteral(join_bytes(self.chars))
         s.encoding = self.target_encoding
         return s
 
     def getchar(self):
-        # this *must* return a byte string! => fix it in Py3k!!
+        # this *must* return a byte string!
         return self.getstring()
 
 class EncodedString(_str):