Is there a way to detect an environment's "default" encoding type under Windows? I'm not sure if code page and encoding mean the same thing here.
For example: When I use Word on my US based version of Windows and decide to save a file as text, I am prompted with an encoding dialog that defaults to 'Windows (default)' which appears maps to their 'Western European (Windows)' code page which I assume maps to code page 1252. (That's a lot of assumptions!). I would like to be able to make the same assumption about text files produced on a user's system. (Of course our software will offer a way to explictly specify an encoding format as well). Here's what I've been able to dig up so far but I'm not sure how reliable this is or if its the same information Word is looking at when it offers a default encoding value. >>> import locale >>> locale.getdefaultlocale()[1] 'cp1252' Any ideas? Malcolm
-- http://mail.python.org/mailman/listinfo/python-list