News for hackers. Stuff that matters.
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.
Re:Don't Put Tilde In Your Path by jetbalsa on Sunday October 11, 2026 @09:45AM (#50043251)
What about people who do not speak English? or even use Latin letters?
Re:Don't Put Tilde In Your Path by mr_mitm on Sunday October 11, 2026 @10:05AM (#50043442)
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.

Re:Don't Put Tilde In Your Path by toast0 on Sunday October 11, 2026 @10:06AM (#50043449)
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
Re:Don't Put Tilde In Your Path by jetbalsa on Sunday October 11, 2026 @12:40PM (#50045084)
if I want to name my file <turd emoji>.txt I damn well will
Re:Don't Put Tilde In Your Path by mnw21cam on Sunday October 11, 2026 @04:15PM (#50047362)
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!
Re:Don't Put Tilde In Your Path by account42 on Wednesday October 14, 2026 @03:58AM (#50083991)
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.

Re:Don't Put Tilde In Your Path by dylan604 on Sunday October 11, 2026 @10:09AM (#50043484)
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.
Re:Don't Put Tilde In Your Path by dieulot on Monday October 12, 2026 @05:48AM (#50053888)
That’s called a “portable filename” in POSIX: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1...
Re:Don't Put Tilde In Your Path by mr_mitm on Monday October 12, 2026 @06:11AM (#50054108)
TIL. Thank you!