On Mon, May 17, 2010 at 2:14 PM, <pyt...@bdurham.com> wrote: > In researching a solution, I believe locale.getpreferredencoding() might > be a better choice (than locale.getdefaultlocale()[ 1 ]) for determining > a system's default encoding?
I haven't used the locale module a lot, but it seems to me that if you're setting the locale with locale.setlocale(), you should get the encoding from locale.getlocale()[1]. You're not really interested in the system's default encoding at this point, you're interested in the encoding of the locale you've explicitly set. -- Jerry -- http://mail.python.org/mailman/listinfo/python-list