this post was submitted on 23 Sep 2025
367 points (95.1% liked)
Programmer Humor
26649 readers
2456 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Yeah, that is pretty much how it works in some GUIs like in the screenshot, where each slash is replaced by
>
. But if you represent the path in a string, and put that string in some context that doesn't know it's a path and that it should be rendered by some special rules, then it'll just be subject to the usual Unicode Bidirectional Algorithm (UBA).The UBA is a masterpiece, and I'm not being sarcastic. For everyday text with mixed directionality, such as a WhatsApp chat in Arabic/Hebrew with a bit of English or just some numbers mixed in, the UBA's default output is the ideal way to order the characters.
The problem is, special cases (such as file paths) just can't be covered by a universal algorithm. You can insert special characters into the path, namely FSI and PDI ("First Strong directional Isolate" and "Pop Directional Isolate") to make the text render the way you want under the UBA... But then, when you copy that path, the special characters would still be there so software would consider them part of the path, and then of course, File Not Found.
I was already interested based on your first comment but this:
has thoroughly piqued my interest. Thank you for being an opinionated nerd on the internet.