Skip to main content

Module entry_name

Module entry_name 

Source

Constantsยง

CP437_HIGH ๐Ÿ”’
CP437 code points 0x80-0xFF; the low half is ASCII.

Functionsยง

decode_name
UTF-8 when general-purpose flag bit 11 says so, else CP437 as the spec and .NET have it, so a file is written under the name the game expects.
is_reserved_device ๐Ÿ”’
Decided on the stem, since Windows opens NUL.txt as the device just as it does NUL.
safe_relative
An entry name as a relative /-separated path that cannot leave the target, or None for a name that tries: any .. segment, a leading separator, a : (a drive or an alternate data stream), a NUL, or nothing at all. Names Windows would quietly rewrite go too: a trailing dot or space, and a reserved device name such as aux.ini.