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.
  1. 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

  2. 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.

  3. killerstorm

    27% more efficient than base32 at expense of all kind of weird compat issues with shell scripts, etc. Yikes!

  4. 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.

  5. cmovq

    > Base84 distinguishes uppercase and lowercase letters, so different encoded names can compare equal on a case-insensitive filesystem.

    I understand for the authors particular application the probability of collision is small, but this makes this encoding completely impractical for filenames generally.

More from this day

2026-09-13