[Patches] [ python-Patches-962502 ] East Asian Width support for Unicode

SourceForge.net noreply at sourceforge.net
Wed Jun 2 13:00:09 EDT 2004


Patches item #962502, was opened at 2004-05-29 07:59
Message generated for change (Comment added) made by perky
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=962502&group_id=5470

Category: Core (C code)
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Hye-Shik Chang (perky)
Assigned to: Hye-Shik Chang (perky)
Summary: East Asian Width support for Unicode

Initial Comment:
As David Goodger's inspiration, I thought that it would
be great if we have some unicode methods that
manipulates East Asian Width
(http://www.unicode.org/reports/tr11/tr11-13.html#UCD).

The attached patch implements rough first-time idea.

>>> u'1'.iswide()
False
>>> u'\uac00'.iswide()
True
>>> u'\ud55c\uae00'.iswide()
True
>>> u'\ud55c\uae00'.width()
4
>>> u'ab\ud55c\uae00'.width()
6
>>> u'ab\ud55c\uae00'.iswide()
False


----------------------------------------------------------------------

>Comment By: Hye-Shik Chang (perky)
Date: 2004-06-03 02:00

Message:
Logged In: YES 
user_id=55188

I just checked in. Thanks for the review!

Doc/api/concrete.tex 1.42
Doc/lib/libstdtypes.tex 1.154
Include/unicodeobject.h 2.43
Lib/test/test_unicode.py 1.88
Misc/NEWS 1.983 1.984
Modules/unicodedata_db.h 1.10
Modules/unicodename_db.h 1.7
Objects/unicodectype.c 2.15
Objects/unicodeobject.c 2.212
Objects/unicodetype_db.h 1.8
Tools/unicode/makeunicodedata.py 1.18


----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2004-06-02 21:29

Message:
Logged In: YES 
user_id=21627

The patch is fine, please apply. Make sure you add
appropriate documentation and test cases.

You might consider moving flags at the end of the struct, so
that no padding is added for UCS-4 builds.



----------------------------------------------------------------------

Comment By: Hye-Shik Chang (perky)
Date: 2004-06-01 22:46

Message:
Logged In: YES 
user_id=55188

Okay. In fact I don't care of Unicode 4.0. I'm fine with 3.2.
I uploaded new patch sticking Unicode revision on 3.2.

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2004-06-01 06:07

Message:
Logged In: YES 
user_id=21627

Updating to the Unicode 4.0 database is risky. It will break
IDNA, which specifies that IDN must use the 3.2 version of
the unicode database.

It would be ok if you could arrange to provide both versions
of the database. Ideally, the database would only store the
deltas from 4.0 to 3.2, so we don't get any increase in
space for cases where the data didn't change between Unicode
versions.

It might be reasonable to leave that issue alone for this
patch, and proceed with the 3.2 version of EastAsianWidth.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=962502&group_id=5470



More information about the Patches mailing list