Question about umlauts and locale

Gregor Hoffleit gregor at hoffleit.de
Fri May 19 16:26:38 CEST 2000


I wonder if it is correct behaviour that "print ('foo','kääk')" prints
"('foo', 'k\344\344k')" regardless if the umlauts are letters according to
the locale set.

One could also expect "('foo','kääk')", iff 'ä' was a letter in the used
locale.

Is this quoting of the umlauts a bug or intentional behavior ?

$ unset LC_ALL
$ python
Python 1.5.2 (#0, Apr  3 2000, 14:46:48)  [GCC 2.95.2 20000313 (Debian
+GNU/Linux)] on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> a=('foo','kääk')
>>> print a
('foo', 'k\344\344k')
>>>
$ export LC_ALL=fi_FI
$ python
Python 1.5.2 (#0, Apr  3 2000, 14:46:48)  [GCC 2.95.2 20000313 (Debian
+GNU/Linux)] on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> a=('foo','kääk')
>>> print a
('foo', 'k\344\344k')
>>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20000519/188a56b4/attachment.sig>


More information about the Python-list mailing list