mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Issue #3811: The Unicode database was updated to 5.1.
Reviewed by Fredrik Lundh and Marc-Andre Lemburg.
This commit is contained in:
parent
9ba7a309be
commit
24329ba176
9 changed files with 19001 additions and 15733 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue