49 Commits

Author SHA1 Message Date
Martin v. Löwis
bd28ca65d6 Bug #1704793: Raise KeyError if unicodedata.lookup cannot
represent the result in a single character.
2007-07-28 07:01:43 +00:00
Walter Dörwald
f2d5c6d117 Backport checkin:
Replace C++ comment with C comment (fixes SF bug #1593525).
2006-11-09 16:30:39 +00:00
Neal Norwitz
b45f351832 I'm not sure why this code allocates this string for the error message.
I think it would be better to always use snprintf and have the format
limit the size of the name appropriately (like %.200s).

Klocwork #340
2006-08-12 01:57:47 +00:00
Martin v. Löwis
789c09d2cd Update dangling references to the 3.2 database to
mention that this is UCD 4.1 now.
2006-08-10 19:04:00 +00:00
Neal Norwitz
37f694f21b No functional change. Add comment and assert to describe why there cannot be overflow which was reported by Klocwork. Discussed on python-dev 2006-07-27 04:04:50 +00:00
Martin v. Löwis
d004fc810a Patch 1494554: Update numeric properties to Unicode 4.1. 2006-05-27 08:36:52 +00:00
Neal Norwitz
88c97845c6 No reason to export get_decomp_record, make static 2006-04-17 00:36:29 +00:00
Martin v. Löwis
3c6e4188ed Support NFD of very long strings. 2006-04-13 06:36:31 +00:00
Neal Norwitz
65c05b20e9 Get rid of warnings about using chars as subscripts
on Alpha (and possibly other platforms) by using Py_CHARMASK().
2006-04-10 02:17:47 +00:00
Martin v. Löwis
c350912990 Adjust CJK Ideograph range to Unicode 4.1. 2006-03-11 12:16:23 +00:00
Martin v. Löwis
0e2f9b2dfb Fix refcounting bug. 2006-03-10 11:29:32 +00:00
Martin v. Löwis
5bd7c02298 Avoid forward-declaring the methods array.
Rename unicodedata.db* to unicodedata.ucd*
2006-03-10 11:20:04 +00:00
Martin v. Löwis
480f1bb67b Update Unicode database to Unicode 4.1. 2006-03-09 23:38:20 +00:00
Thomas Wouters
1e365b265a Remove gcc (4.0.x) warning about uninitialized value by explicitly setting
the sentinel value in the main function, rather than the helper. This
function could possibly do with an early-out if any of the helper calls ends
up with a len of 0, but I doubt it really matters (how common are malformed
hangul syllables, really?)
2006-03-01 21:58:30 +00:00
Martin v. Löwis
8b291e2d66 Patch #1213831: Fix typo in unicodedata._getcode.
Will backport to Python 2.4.
2005-09-18 08:17:56 +00:00
Hye-Shik Chang
4c560ea05b Correct URL to the official UnicodeData 3.2.0 resource. (Reported
by Darek Suchojad)
2005-06-04 07:31:48 +00:00
Hye-Shik Chang
cf18a5d67b Fill docstrings for module and functions, extracted from the tex
documentation.  (Patch #1173245, Contributed by Jeremy Yallop)
2005-04-04 16:32:07 +00:00
Hye-Shik Chang
e9ddfbb412 SF #989185: Drop unicode.iswide() and unicode.width() and add
unicodedata.east_asian_width().  You can still implement your own
simple width() function using it like this:
    def width(u):
        w = 0
        for c in unicodedata.normalize('NFC', u):
            cwidth = unicodedata.east_asian_width(c)
            if cwidth in ('W', 'F'): w += 2
            else: w += 1
        return w
2004-08-04 07:38:35 +00:00
Hye-Shik Chang
69dc1c8f6a Fix typo. 2004-07-15 04:30:25 +00:00
Martin v. Löwis
61e40bd897 Special case normalization of empty strings. Fixes #924361.
Backported to 2.3.
2004-04-17 19:36:48 +00:00
Martin v. Löwis
d2171d2ba4 Overallocate target buffer for normalization more early. Fixes #834676.
Backported to 2.3.
2003-11-06 20:47:57 +00:00
Neal Norwitz
e9c571f968 Fix SF bug #694816, remove comparison of unsigned value < 0 2003-02-28 03:14:37 +00:00
Martin v. Löwis
2fb661fb80 Remove C++ comment. 2002-12-07 14:56:36 +00:00
Martin v. Löwis
b5c980b802 Add unidata_version. Bump generator version number. 2002-11-25 09:13:37 +00:00
Martin v. Löwis
8d93ca1383 Verify that the code in CJK UNIFIED IDEOGRAPH- actually denotes an ideograph. 2002-11-23 22:10:29 +00:00