Re:Don't Put Tilde In Your Path
by mr_mitm on Sunday October 11, 2026 @09:43AM
(#50043226)
So many headaches could be avoided if we only allowed `[A-Za-z0-9._-]` in paths. (Arguably, even `-` can be problematic.) Encoding issues, expansion, parameter separation, ... and I never saw a convincing case in favor of supporting anything else.
[ Parent
| on HN ]
What about people who do not speak English? or even use Latin letters?
The language I grew up with does use non latin letters, I can manage. Then again, it's only four of them, so I get your point ... but I can dream, can't I?
Re:Don't Put Tilde In Your Path
by ThunderSizzle on Sunday October 11, 2026 @09:48AM
(#50043279)
What Latin letter(s) are you referring to?
The (classical) Latin alphabet can be fully described by the English alphabet.
What about people who do not ((speak English?) or (even use Latin letters?))
Re:Don't Put Tilde In Your Path
by cowboylowrez on Sunday October 11, 2026 @09:52AM
(#50043317)
unicode names spit
if I want to name my file <turd emoji>.txt I damn well will
Any fule no that a file name is just an array of bytes (excluding the null byte and the slash). You can create a file with a name that is an invalid UTF-8 encoding. It's fun to see how much software chokes on that!
They managed just fine when ASCII was all they had.
Re:Don't Put Tilde In Your Path
by Dylan16807 on Sunday October 11, 2026 @10:58AM
(#50043999)
If you're trying to avoid headaches then definitely don't allow -. At least not as the first character in a segment.
And allowing any letters from any language is probably worth the hassle.
I always joked about setting a custom keyboard layout to replace the space char with the underscore char specifically for avoiding spaces in file paths.
That’s called a “portable filename” in POSIX: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1...