Why exception from os.path.exists()?

eryk sun eryksun at gmail.com
Fri Jun 8 08:16:42 EDT 2018


On Fri, Jun 8, 2018 at 11:35 AM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
>
> (referring to both the NUL bytes in UTF-16 encoded NTFS file names, and
> the lack of NUL bytes in common Linux file names).

NTFS filenames are stored as wchar_t strings, for which NUL is
L"\x00\x00". Individual null bytes are irrelevant to this problem,
unless we're using an encoding such as an ASCII superset that stores
the character NUL as "\x00".



More information about the Python-list mailing list