ajung@localhost:~/sandboxes/Zope/Zope: locale
LANG=
LC_CTYPE=fr_FR.UTF8
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
ajung@localhost:~/sandboxes/Zope/Zope: python2.3
Python 2.3.4 (#1, Nov 6 2004, 11:45:40)
[GCC 3.4.2] on linux2
Type "help", "copyright", "credits" or "license" for
more information.
>>> import locale
>>> locale.getpreferredencoding()
'UTF-8'
>>> locale.getdefaultlocale()
['fr_FR', 'utf']
>>>
As you can see the encoding is set to 'UTF-8' but
getdefaultlocale()
returns only 'utf'. If I set LC_CTYPE e.g. to
'fr_FR.iso-8859-10 then the
right encoding is returned.
Affected: Python 2.3.4, 2.4b1
OS: Linux i386 Fedora Core 2
|