diff options
author | Stefan Behnel <scoder@users.berlios.de> | 2010-07-03 18:22:12 +0200 |
---|---|---|
committer | Stefan Behnel <scoder@users.berlios.de> | 2010-07-03 18:22:12 +0200 |
commit | 4603013caeef083cca7aeeff498441105384e79c (patch) | |
tree | a37b0eeb37be98e2e7f287c7d64ac183560e678d /Cython/Compiler/StringEncoding.py | |
parent | f180a00f4b28a29c788fd4305cb7e611339bb1cc (diff) | |
download | cython-4603013caeef083cca7aeeff498441105384e79c.tar.gz |
fix order of surrogate pair in wide unicode strings
Diffstat (limited to 'Cython/Compiler/StringEncoding.py')
-rw-r--r-- | Cython/Compiler/StringEncoding.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Cython/Compiler/StringEncoding.py b/Cython/Compiler/StringEncoding.py index 637bca1ca..09ca20794 100644 --- a/Cython/Compiler/StringEncoding.py +++ b/Cython/Compiler/StringEncoding.py @@ -36,8 +36,8 @@ class UnicodeLiteralBuilder(object): # wide Unicode character on narrow platform => replace # by surrogate pair char_number -= 0x10000 - self.chars.append( unichr((char_number % 1024) + 0xDC00) ) self.chars.append( unichr((char_number // 1024) + 0xD800) ) + self.chars.append( unichr((char_number % 1024) + 0xDC00) ) else: self.chars.append( unichr(char_number) ) else: |