[issue4971] Incorrect title case

Martin v. Löwis report at bugs.python.org
Sun Jan 18 01:09:14 CET 2009


Martin v. Löwis <martin at v.loewis.de> added the comment:

> Perhaps we are looking at different files; 

Indeed, I was looking at the 3.2.0 database (assuming that it would be
the same in subsequent versions).

> ISTM the problem is that implementing the default-to-uppercase was not
> done in Tools/unicode/makeunicodedata.py where full information is
> available. This left no way in _PyUnicode_ToTitlecase of resolving the
> ambiguity of a zero value for ctype->title -- is it "no titlecase
> supplied so use uppercase" or is it "titlecase supplied, delta == 0,
> means ch.title() -> ch"?

Correct. So it seems this needs to be fixed in makeunicodedata.py
already. This was not the case with earlier versions of Unicode (which
never had a mapping to the same code point).

The logic for using deltas is also incorrect, so makeunicodedata.py
needs to be fixed anyway.

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4971>
_______________________________________


More information about the Python-bugs-list mailing list