diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2008-09-10 14:08:48 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2008-09-10 14:08:48 (GMT) |
commit | 93cbca33f2ab8dd8ed0f8582d94ed1a65fd137a4 (patch) | |
tree | bdd0c8f060a25f4d264bbd0db694ec0e6f8b8eae /Modules/unicodedata.c | |
parent | 1009d391873b523232440856fe1e728c3c94caab (diff) | |
download | cpython-93cbca33f2ab8dd8ed0f8582d94ed1a65fd137a4.zip cpython-93cbca33f2ab8dd8ed0f8582d94ed1a65fd137a4.tar.gz cpython-93cbca33f2ab8dd8ed0f8582d94ed1a65fd137a4.tar.bz2 |
Merged revisions 66362 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r66362 | martin.v.loewis | 2008-09-10 15:38:12 +0200 (Mi, 10 Sep 2008) | 3 lines
Issue #3811: The Unicode database was updated to 5.1.
Reviewed by Fredrik Lundh and Marc-Andre Lemburg.
........
Diffstat (limited to 'Modules/unicodedata.c')
-rw-r--r-- | Modules/unicodedata.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c index 575d836..12bda09 100644 --- a/Modules/unicodedata.c +++ b/Modules/unicodedata.c @@ -1,8 +1,8 @@ /* ------------------------------------------------------------------------ - unicodedata -- Provides access to the Unicode 4.1 data base. + unicodedata -- Provides access to the Unicode 5.1 data base. - Data was extracted from the Unicode 4.1 UnicodeData.txt file. + Data was extracted from the Unicode 5.1 UnicodeData.txt file. Written by Marc-Andre Lemburg (mal@lemburg.com). Modified for Python 2.0 by Fredrik Lundh (fredrik@pythonware.com) @@ -34,6 +34,7 @@ typedef struct change_record { const unsigned char bidir_changed; const unsigned char category_changed; const unsigned char decimal_changed; + const unsigned char mirrored_changed; const int numeric_changed; } change_record; @@ -355,6 +356,8 @@ unicodedata_mirrored(PyObject *self, PyObject *args) const change_record *old = get_old_record(self, c); if (old->category_changed == 0) index = 0; /* unassigned */ + else if (old->mirrored_changed != 0xFF) + index = old->mirrored_changed; } return PyLong_FromLong(index); } @@ -1179,11 +1182,11 @@ PyDoc_STRVAR(unicodedata_docstring, "This module provides access to the Unicode Character Database which\n\ defines character properties for all Unicode characters. The data in\n\ this database is based on the UnicodeData.txt file version\n\ -4.1.0 which is publically available from ftp://ftp.unicode.org/.\n\ +5.1.0 which is publically available from ftp://ftp.unicode.org/.\n\ \n\ The module uses the same names and symbols as defined by the\n\ -UnicodeData File Format 4.1.0 (see\n\ -http://www.unicode.org/Public/4.1.0/ucd/UCD.html)."); +UnicodeData File Format 5.1.0 (see\n\ +http://www.unicode.org/Public/5.1.0/ucd/UCD.html)."); static struct PyModuleDef unicodedatamodule = { |