[Python-Dev] Removal of Win32 ANSI API

"Martin v. Löwis" martin at v.loewis.de
Fri Nov 12 20:44:34 CET 2010


> I'm not talking about Windows obviously. POSIX filenames are natively
> bytes, so if you get a bytes filename from an external source, it makes
> sense to reuse the bytes form.
> 
> I think it would be a mistake to allow bytes filenames under POSIX but
> not under Windows. It makes porting harder.

Not really. People who want to write portable code should use Unicode
filenames everywhere, not byte filenames.

> 
>>  - tar stores filenames... in the locale encoding (except for PAX format which 
>> uses utf-8)
> 
> So bytes filenames are useful at least for tar.

No, they are not. The tarfile module decodes all file names on its own,
IIUC.

Regards,
Martin


More information about the Python-Dev mailing list