test__locale (that's two underscores, testing _locale.c) fails on my
Red Hat 7.3 box. Further investigation shows that it's because the
et_EE locale (Estonia(n)) defines the thousands separator as '\xa0'
(no-break space U+00A0). Both localeconv() and nl_langinfo() use
PyUnicode_FromString() which assumes UTF-8, and hence the decoding
fails.

On my OSX box, the thousands separator in the et_EE locale is a
regular space.. On a Red Hat 9 box I have access to at work it is
'\xa0' as well (tested with Python2.4; I assume Python 3.0 would fail
there too). On my Ubuntu box that locale is unsupported.

I can "fix" it on that particular box by using latin-1 instead, but
that sounds wrong. There's an XXX comment in the code for
nl_langinfo() about possibly converting to wcs (wide character set?).

Any ideas? Removing et_EE from the list of interesting locales in
test__locale.py seems lame.

I did a quick web search and the first few hits are all about an
exchange whereby someone from Estonia asked Red Hat to change the
locale to use 8859-15 and the Red Hat guy point blank refused, saying
it was the Estonians own fault for having submitted incorrect locale
info a few years before. (But in 8859-15 \xa0 is the same no-break
space character as it is in Latin-1, so this may all be irrelevant.)

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to