Update to Unicode 3.2 database.
This commit is contained in:
parent
ecbb0eaa43
commit
9def6a3a77
@ -2,6 +2,6 @@ test_ucn
|
|||||||
Testing General Unicode Character Name, and case insensitivity... done.
|
Testing General Unicode Character Name, and case insensitivity... done.
|
||||||
Testing name to code mapping.... done.
|
Testing name to code mapping.... done.
|
||||||
Testing code to name mapping for all characters.... done.
|
Testing code to name mapping for all characters.... done.
|
||||||
Found 10538 characters in the unicode name database
|
Found 11556 characters in the unicode name database
|
||||||
Testing misc. symbols for unicode character name expansion.... done.
|
Testing misc. symbols for unicode character name expansion.... done.
|
||||||
Testing unicode character name expansion strict error handling.... done.
|
Testing unicode character name expansion strict error handling.... done.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
test_unicodedata
|
test_unicodedata
|
||||||
Testing Unicode Database...
|
Testing Unicode Database...
|
||||||
Methods: 84b72943b1d4320bc1e64a4888f7cdf62eea219a
|
Methods: a37276dc2c158bef6dfd908ad34525c97180fad9
|
||||||
Functions: 41e1d4792185d6474a43c83ce4f593b1bdb01f8a
|
Functions: 79b4425f140f5f31179fde6db05772d21e75c228
|
||||||
API: ok
|
API: ok
|
||||||
|
@ -36,7 +36,7 @@ _getrecord(PyUnicodeObject* v)
|
|||||||
|
|
||||||
code = (int) *PyUnicode_AS_UNICODE(v);
|
code = (int) *PyUnicode_AS_UNICODE(v);
|
||||||
|
|
||||||
if (code < 0 || code >= 65536)
|
if (code < 0 || code >= 0x110000)
|
||||||
index = 0;
|
index = 0;
|
||||||
else {
|
else {
|
||||||
index = index1[(code>>SHIFT)];
|
index = index1[(code>>SHIFT)];
|
||||||
@ -219,7 +219,7 @@ unicodedata_decomposition(PyObject *self, PyObject *args)
|
|||||||
|
|
||||||
code = (int) *PyUnicode_AS_UNICODE(v);
|
code = (int) *PyUnicode_AS_UNICODE(v);
|
||||||
|
|
||||||
if (code < 0 || code >= 65536)
|
if (code < 0 || code >= 0x110000)
|
||||||
index = 0;
|
index = 0;
|
||||||
else {
|
else {
|
||||||
index = decomp_index1[(code>>DECOMP_SHIFT)];
|
index = decomp_index1[(code>>DECOMP_SHIFT)];
|
||||||
@ -284,7 +284,7 @@ _getucname(Py_UCS4 code, char* buffer, int buflen)
|
|||||||
int word;
|
int word;
|
||||||
unsigned char* w;
|
unsigned char* w;
|
||||||
|
|
||||||
if (code >= 65536)
|
if (code >= 0x110000)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* get offset into phrasebook */
|
/* get offset into phrasebook */
|
||||||
|
File diff suppressed because it is too large
Load Diff
17739
Modules/unicodename_db.h
17739
Modules/unicodename_db.h
File diff suppressed because it is too large
Load Diff
@ -36,7 +36,7 @@ gettyperecord(Py_UNICODE code)
|
|||||||
{
|
{
|
||||||
int index;
|
int index;
|
||||||
|
|
||||||
if (code >= 65536)
|
if (code >= 0x110000)
|
||||||
index = 0;
|
index = 0;
|
||||||
else {
|
else {
|
||||||
index = index1[(code>>SHIFT)];
|
index = index1[(code>>SHIFT)];
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -448,7 +448,7 @@ class UnicodeData:
|
|||||||
|
|
||||||
def __init__(self, filename, expand=1):
|
def __init__(self, filename, expand=1):
|
||||||
file = open(filename)
|
file = open(filename)
|
||||||
table = [None] * 65536
|
table = [None] * 0x110000
|
||||||
while 1:
|
while 1:
|
||||||
s = file.readline()
|
s = file.readline()
|
||||||
if not s:
|
if not s:
|
||||||
@ -476,7 +476,7 @@ class UnicodeData:
|
|||||||
# public attributes
|
# public attributes
|
||||||
self.filename = filename
|
self.filename = filename
|
||||||
self.table = table
|
self.table = table
|
||||||
self.chars = range(65536) # unicode
|
self.chars = range(0x110000) # unicode 3.2
|
||||||
|
|
||||||
def uselatin1(self):
|
def uselatin1(self):
|
||||||
# restrict character range to ISO Latin 1
|
# restrict character range to ISO Latin 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user