summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHye-Shik Chang <hyeshik@gmail.com>2006-03-28 08:27:27 (GMT)
committerHye-Shik Chang <hyeshik@gmail.com>2006-03-28 08:27:27 (GMT)
commit6c52761464776c8f6830a0db260d06281f649900 (patch)
tree458c2edfeb1bf67ded71280e5aae0c5a8fe92974
parent653cf0257a52ac369f40ba7eb0813812260bde62 (diff)
downloadcpython-6c52761464776c8f6830a0db260d06281f649900.zip
cpython-6c52761464776c8f6830a0db260d06281f649900.tar.gz
cpython-6c52761464776c8f6830a0db260d06281f649900.tar.bz2
Ubuntu bug #29289: Fixed a bug that the gb18030 codec raises
RuntimeError on encoding surrogate pair area on UCS4 build. This is a partial backport of r43320. (Approved by Anthony Baxter)
-rw-r--r--Misc/NEWS6
-rw-r--r--Modules/cjkcodecs/_codecs_cn.c5
2 files changed, 7 insertions, 4 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index aa41dd7..2b89aeb 100644
--- 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?
=============================
diff --git a/Modules/cjkcodecs/_codecs_cn.c b/Modules/cjkcodecs/_codecs_cn.c
index 9a885bb..5b071fc 100644
--- a/Modules/cjkcodecs/_codecs_cn.c
+++ b/Modules/cjkcodecs/_codecs_cn.c
@@ -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;
}