]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Ubuntu bug #29289: Fixed a bug that the gb18030 codec raises
authorHye-Shik Chang <hyeshik@gmail.com>
Tue, 28 Mar 2006 08:27:27 +0000 (08:27 +0000)
committerHye-Shik Chang <hyeshik@gmail.com>
Tue, 28 Mar 2006 08:27:27 +0000 (08:27 +0000)
RuntimeError on encoding surrogate pair area on UCS4 build.
This is a partial backport of r43320. (Approved by Anthony Baxter)

Misc/NEWS
Modules/cjkcodecs/_codecs_cn.c

index aa41dd71aa8e6280816a025502f9c3baf0cc4d66..2b89aebb351877817b7227b043a1681c60096ccd 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -17,11 +17,17 @@ Core and builtins
 - A threading issue that caused random segfaults on some platforms from 
   the testsuite was fixed in test_capi.
 
+Extension Modules
+-----------------
+
 - Reverted fix for Bug #1379994: Builtin unicode_escape and 
   raw_unicode_escape codec now encodes backslash correctly.
   This caused another issue for unicode repr strings being double-escaped
   (SF Bug #1459029). Correct fix will be in 2.5, but is too risky for 2.4.3.
 
+- Ubuntu bug #29289: Fixed a bug that the gb18030 codec raises
+  RuntimeError on encoding surrogate pair area on UCS4 build.
+
 What's New in Python 2.4.3c1?
 =============================
 
index 9a885bbb3c3f6d01b0973b7abbf7289b99db9594..5b071fc54ad4b1775ab95331466dc58f489308d6 100644 (file)
@@ -218,11 +218,8 @@ ENCODER(gb18030)
                                        break;
                                }
 
-                       if (utrrange->first == 0) {
-                               PyErr_SetString(PyExc_RuntimeError,
-                                               "unicode mapping invalid");
+                       if (utrrange->first == 0)
                                return 1;
-                       }
                        continue;
                }