Commit 9def6a3a authored by Martin v. Löwis's avatar Martin v. Löwis

Update to Unicode 3.2 database.

parent ecbb0eaa
...@@ -2,6 +2,6 @@ test_ucn ...@@ -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.
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) ...@@ -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) ...@@ -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) ...@@ -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 */
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
...@@ -36,7 +36,7 @@ gettyperecord(Py_UNICODE code) ...@@ -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)];
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -448,7 +448,7 @@ class UnicodeData: ...@@ -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: ...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment