platform default language and encoding

Gillou nospam at
Tue Aug 20 14:09:26 CEST 2002


I'm in process to make a localisable Zope product that guesses the server
Using this with Python 2.1.3...

>>> import locale
>>> locale.getdefaultlocale()

--> Win32 : ('fr_FR', 'cp1252')
--> FreeeBSD : ('fr_FR', 'iso8859-1')

This is perfect for me but I heard that this does not always work and
sometimes returns an empty tuple.
What are the guru opinions about this ?


>>> from base64 import decodestring
>>> replyTo = decodestring('Z2xlbmZhbnRAYmlnZm9vdC5jb20=\n')

More information about the Python-list mailing list