Re:Base84 deserves a place in file names
by hnlmorg on Sunday September 13, 2026 @02:35PM
(#49687190)
I don’t see how they’re any worse than spaces in file names, which is an edge case you need to cater for already anyway.
[ Parent
| on HN ]
Re:Base84 deserves a place in file names
by hn993302 on Sunday September 13, 2026 @04:14PM
(#49688214)
I don't want spaces either. Of course your scripts should never assume any of this, and this only matters when doing stuff manually (or ai-yolo) in the shell.
Re:Base84 deserves a place in file names
by eklitzke on Sunday September 13, 2026 @02:45PM
(#49687303)
You only "need" to do this if you are handling arbitrary untrusted filenames. It's pretty common for people to write shell scripts that are only used for handling files they create that don't have unusual characters, and these shell scripts work just fine.
Re:Base84 deserves a place in file names
by hnlmorg on Sunday September 13, 2026 @04:22PM
(#49688283)
Until they don’t. Maybe the old team leave or a new requirement comes in.
Re:Base84 deserves a place in file names
by crabbone on Sunday September 13, 2026 @06:02PM
(#49689162)
They also have single quote, dollar and backtick... this is a lot worse than just whitespace. The problem with whitespace surface when the programmer made no effort to escape the string used as a file name. This adds a whole new vector of problems that happen when the programmer tried to escape the string, but it didn't work.
It was too long ago, so, I've forgotten the names, but I remember the saga with PHP escaping (and failing) SQL queries (some sort of sql_real_now_honest_real_escape_string() function or something like that).
Re:Base84 deserves a place in file names
by hnlmorg on Sunday September 13, 2026 @06:26PM
(#49689368)
It depends on the shell you use and how your file names are handled.
Bash is a clusterfuck waiting to happen when it comes to file names, but not all shells would be at risk here. For example the shell I maintain would be fine because file names are tokenised like how variables are tokenised in SQL strings when using parametrised queries (to use your SQL/PHP example).