summaryrefslogtreecommitdiff
path: root/Cython/Compiler/StringEncoding.py
diff options
context:
space:
mode:
authorStefan Behnel <scoder@users.berlios.de>2009-08-21 10:44:15 +0200
committerStefan Behnel <scoder@users.berlios.de>2009-08-21 10:44:15 +0200
commit6ecf24a85ccc5134b15ec31cc2d2ba607a6fa46e (patch)
treead07b15b6c023cd5b5b75666aded537b059d782a /Cython/Compiler/StringEncoding.py
parentaee044e878d7f7ed898db3a6553fa45c07a57cec (diff)
downloadcython-6ecf24a85ccc5134b15ec31cc2d2ba607a6fa46e.tar.gz
Py2.x fix after Py3 char fix ;)
Diffstat (limited to 'Cython/Compiler/StringEncoding.py')
-rw-r--r--Cython/Compiler/StringEncoding.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Cython/Compiler/StringEncoding.py b/Cython/Compiler/StringEncoding.py
index dcb5079c6..3df6ffcc6 100644
--- a/Cython/Compiler/StringEncoding.py
+++ b/Cython/Compiler/StringEncoding.py
@@ -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):