[Python-Dev] Re: other "magic strings" issues
David Eppstein
eppstein at ics.uci.edu
Wed Nov 12 17:13:29 EST 2003
On 11/12/03 9:31 PM +0100 "Martin v. Löwis" <martin at v.loewis.de> wrote:
> That said, locale.strcoll does what you want.
It does?
>>> locale.strcoll(unicode('Universität','utf8'),u'University')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
UnicodeError: ASCII encoding error: ordinal not in range(128)
>>> locale.setlocale(locale.LC_COLLATE,'en_US')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.2/locale.py", line 372, in setlocale
return _setlocale(category, locale)
locale.Error: locale setting not supported
Even if locale would allow me to set a locale, which locale should I set,
in order to allow all unicodes (not just e.g. iso-8859-1, but all of them)
to be collated in some reasonable order?
--
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