this post was submitted on 16 Jul 2024
265 points (95.8% liked)

Programmer Humor

32000 readers
1744 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 6 points 2 months ago (3 children)

Unicode in filenames? Are you crazy?!

Okay that was /s to some extent but I gotta rant, I'm totally convinced that there's still new software today that completely trip over themselves when files or paths have non-ASCII characters, or sometimes even a space. Incompetence didn't go anywhere.

[–] [email protected] 2 points 2 months ago (1 children)

I still use underscores for filenames, basically muscle memory at this point

[–] [email protected] 0 points 2 months ago (1 children)

Spaces in file names will always be fiddly though. It'll work, but it'll still be wrong, because arguments are space separated, and having spaced file names totally messes with that.

[–] [email protected] 1 points 2 months ago* (last edited 2 months ago) (1 children)

I try to just always put files names or paths into quotes in CLI or tie it to a variable in programming. This way it also accepts spaces and knows how to separate it from arguments.

[–] [email protected] 1 points 2 months ago

Yeah. It's a good idea to guard against it, but I would still never put spaces in filesnames that I myself choose.

[–] [email protected] 2 points 2 months ago

Unicode in filenames can be a bad idea, since there are more than one way to achieve what looks like the same character. So matching patterns could fail if you think it's one way, but it's actually another representation in unicode.

[–] [email protected] 1 points 2 months ago

Incompetence didn't go anywhere.

Now that's certainly true, but the beauty of open source software is that we can fix bugs when we encounter them.