- 0 Posts
- 9 Comments
You complain about ASCII filenames but a few of the examples are obviously Unicode, namely using emoji, well outside of the ASCII character set. But since you’ve brought up Unicode file names, let me introduce you to bidirectional text!
If you use Hebrew or Arabic, some of your directories or files will have right-to-left text in them. This is a recipe for disaster.
If in English you’d have “C:\Users\Adam\Documents\Research\Paper.pdf”, which breaks down to:
- C:\
- Users\
- Adam\
- Documents\
- Research\
- Paper.pdf
In Hebrew you’d have: “C:\משתמשים\אדם\מסמכים\מחקר\מאמר.pdf”, which breaks down to:
- C:\
- משתמשים\
- אדם\
- מסמכים\
- מחקר\
- מאמר.pdf
The entire path goes backwards, and the “.pdf” extension is visually attached to the “Users” folder if the text is rendered naively. It’s insane. Fortunately many GUI shells nowadays separate each path item so they can’t get intermixed like this. Example:
But still, if you copy a path into plaintext, it will still visually look wrong, and there is literally nothing that anyone can do about it. This is the correct way to render this text.
Exact same issues occur in Arabic and the few other RTL languages usedin the world. It’s a massive pain.
Edit: oh, and on commandline on Windows, the required characters aren’t even available by default so you get this lovely thing
Depends how you count. Both
:
and!
require shift as well.
NeatNit@discuss.tchncs.deto Ask Lemmy@lemmy.world•Do you think anyone will be able to remember who any of us are in 600 years?1·5 days agoI find it odd that natural disaster isn’t on your list considering it’s by far the most realistic scenario. Hell, it’s already happening.
I guess the word “natural” isn’t very accurate for a climate disaster, but still, it’s not on your list.
The funniest thing to me is that any good manual would just say “DO NOT USE SOCKS AND FLIP FLOPS SIMULTANEOUSLY”
NeatNit@discuss.tchncs.deto Ask Lemmy@lemmy.world•What in your country/area is totally normal but visitors get excited for?0·26 days agoWhen I visited the US I was excited to see squirrels running around. We don’t have squirrels where I’m from. We took pictures.
It must have looked like we were excited to witness a cloud in the sky.
One thing’s for sure, that’s not a girl and it’s not fooling anyone. It’s a grown-ass woman with some perspective or editing trickery.
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.