logoalt Hacker News

mr_mitm • today at 1:43 PM • 3 replies • view on HN

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.


Replies

jetbalsa • today at 1:45 PM

What about people who do not speak English? or even use Latin letters?

➕ show 2 replies
Dylan16807 • today at 2:58 PM

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.

dylan604 • today at 2:09 PM

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.