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.
........
This commit is contained in:
Martin v. Löwis 2008-09-10 14:08:48 +00:00
parent 1009d39187
commit 93cbca33f2
8 changed files with 19135 additions and 15886 deletions

View file

@ -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 = {