calling locale.setlocale repeatedly

M

Michael Goerz

Hi,

From
http://www.pyzine.com/Issue008/Section_Articles/article_Encodings.html#guessing-the-encoding:
The way to access the information about the "normal" encoding used on the current computer is through the locale module. Before using locale to retrieve the information you want, you need to call locale.setlocale(locale.LC_ALL, ''). Because of the sensitivity of the underlying C locale module on some platforms, this should only be done once.

Why should the call
locale.setlocale(locale.LC_ALL, '')
only be made once? What exactly is the "sensitivity of the underlying C
locale module"?


Thanks,
Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top