Windows forces TurboCrypt to abandon Base91 for a new Base84 encoding
Base84 deserves a place in file names
TurboCrypt, a file encryption tool, originally used Base91 to encode encrypted file names for Unix systems. When adding Windows support, nine forbidden characters and the trailing dot restriction left only 84 safe characters. The author introduces Base84, a novel encoding that packs bits into five-character groups, achieving about 25% expansion—better than Base64—while avoiding reserved device names and hidden files. No padding or special handling is required.
Base84 deserves a place in file names.
- Dwedit
Meanwhile, Windows uses UTF-16 everywhere internally, so "a" and "あ" are both 2 bytes large. You'd still have to exclude surrogate pairs and the Unicode control characters from a filename.
- abound
> Here’s the alphabet, in encoding order:
> ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#$%&'()+,-;=@[]^_`{}~
Yeah I definitely don't want any of those last ~22 characters in file names if I need to do anything with them from a shell
- bensyverson
The non-alphanumeric characters are just asking for trouble. Agents will fail to escape them correctly, and the $ could expand a variable.
Base62 (or 64, with -_) is totally sufficient.