diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2008-09-10 13:38:12 +0000 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2008-09-10 13:38:12 +0000 |
commit | 24329ba1762688f78ff589d0243683c4afafe096 (patch) | |
tree | b28da2fb6853f6e02df9145012d9c1a8d84c9251 /Modules/unicodedata.c | |
parent | 9ba7a309be6b19d98e6866027ed8b110fd47184d (diff) | |
download | cpython-git-24329ba1762688f78ff589d0243683c4afafe096.tar.gz |
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 abb391a0a1..ad77651a26 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; @@ -354,6 +355,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 PyInt_FromLong(index); } @@ -1177,11 +1180,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)."); PyMODINIT_FUNC initunicodedata(void) |