On Tue, Aug 18, 2009 at 01:10:58PM +0200, Jan Ingvoldstad wrote:
> On Tue, Aug 18, 2009 at 12:54 PM, Troels Liebe Bentsen<t...@rapanden.dk> 
> wrote:

> > Besides that, a simple check on Unix for what the locale is set to might 
> > also be
> > nice, so we don't write UTF8 files on a filesystem where the rest for the 
> > files
> > are in Latin1.
> The locale doesn't say what format the filenames are on the
> filesystem, though, merely the current user's language preferences may
> be.

We don't want to make the same mistakes as Python 3:


The summary is that different file names in the same directory might be
in different encodings, and your programming language runtime sucks big time
if it doesn't offer you a way to iterate over all of them somehow, even if
you can't render their names.

[Consider a security critical program scanning using glob('*'), which gives
a clean bill of health because it opened "all" files and found no problems.]

I don't know how Python 3 resolved this.

Nicholas Clark

Reply via email to