[Python-Dev] Re: other "magic strings" issues
David Eppstein
eppstein at ics.uci.edu
Tue Nov 11 13:09:05 EST 2003
In article <200311111713.hABHDJt17461 at 12-236-54-216.client.attbi.com>,
Guido van Rossum <guido at python.org> wrote:
> > The locale module has some things in this direction -- strxfrm and
> > strcoll, maybe? -- but I don't know what they do with unicode & doubt
> > they even exist on OS X.
>
> IMO, locale and Unicode shouldn't be mentioned in the same sentence.
> At least the part of the locale that defines properties of characters
> is subsumed in Unicode in a way that doesn't require you to specify
> the locale. (Of course the locale is still important in defining
> things like conventions for formatting numbers and dates.)
The locale (as a concept) is also important in determining a unicode
collation ordering, but it sounds like locale (as a Python module)
doesn't do that.
Ok, it sounds like I am stuck with PyObjC's
NSString.localizedCaseInsensitiveCompare_, since Python's built-in
cmp(unicode,unicode) sucks and locale doesn't provide an alternative.
Are there any plans to add better collation ordering for unicode in
future Python versions?
Googling finds statements like
http://mail.python.org/pipermail/i18n-sig/2001-May/000929.html
(over two years ago, saying this has been on the plate for some time
already then) but not much recent.
--
David Eppstein http://www.ics.uci.edu/~eppstein/
Univ. of California, Irvine, School of Information & Computer Science
More information about the Python-Dev
mailing list