[Python-Dev] Use our strict mbcs codec instead of the Windows ANSI API

Stephen J. Turnbull stephen at xemacs.org
Tue Oct 25 06:20:12 CEST 2011


Victor Stinner writes:

 > I propose to raise Unicode errors if a filename cannot be decoded
 > on Windows, instead of creating a bogus filenames with questions
 > marks.

By "bogus" you mean "sometimes (?) invalid and the OS will refuse to
use them, causing a later hard-to-diagnose exception", rather than
"not what the user thinks he wants", right?

In the "hard errors" case, a hearty +1 (I'm dealing with this in an
experimental version of XEmacs and it's a right PITA if the codec
doesn't complain).  Backward compatibility is important, but here the
costs of fixing such bugs outweigh the value of bug-compatibility.

In the latter (doing things behind the users back rather than actually
breaking the program), I'm basically +1 but do worry about backward
compatibility.



More information about the Python-Dev mailing list