Author: victor.stinner Date: Fri Jul 30 22:08:12 2010 New Revision: 83297 Log: Fix _Py_wchar2char(): unescape char in U+DC00..U+DCFF instead of range U+D800..U+DFFF Modified: python/branches/import_unicode/Modules/main.c Modified: python/branches/import_unicode/Modules/main.c ============================================================================== --- python/branches/import_unicode/Modules/main.c (original) +++ python/branches/import_unicode/Modules/main.c Fri Jul 30 22:08:12 2010 @@ -744,7 +744,7 @@ bytes = result; for (i=0; i < len; i++) { c = text[i]; - if (c >= 0xd800 && c <= 0xdfff) { + if (c >= 0xdc00 && c <= 0xdcff) { /* Surrogate character */ *bytes++ = c - 0xdc00; size--;