[issue1754] WindowsError messages are not properly encoded

Amaury Forgeot d'Arc report at bugs.python.org
Mon Jan 7 22:27:41 CET 2008


Amaury Forgeot d'Arc added the comment:

> Forcing English messages would certainly reduce the problems
And it does not even work: my French Windows XP does not contain the
English error messages :-(

> If we declare that all strings are considered as CP_ACP in the
> exception, then the only way to fix it would be to convert it from
> CP_ACP to CP_OEMCP (or, more generally, sys.stderr.encoding) on
> printing. Such conversion should be implemented in an unfailing way,
> either using replacement characters or falling back to no conversion.

If this is chosen, I propose to use CharToOem as the "unfailing"
conversion function. I will try to come with a patch following this idea.

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1754>
__________________________________


More information about the Python-bugs-list mailing list