Fake names for localized xdg folders?

Currently on a localized system the folders can have a name like this

$ ls
 Flameshot   Krita             Spectacle     'VirtualBox VMs'   Έγγραφα               Λήψεις
 Games       mullvad-browser   SteamLibrary   Βίντεο            Εικόνες               Μουσική
 Git         OBS               sys.log        Δημόσια          'Επιφάνεια εργασίας'   Πρότυπα

Now there is no technical issue with this besides the fact containers may not like it(I’m using distrobox)

$ ls
 Flameshot
 Games
 Git
 Krita
 OBS
 Spectacle
 SteamLibrary
'VirtualBox VMs'
 mullvad-browser
''$'\316\210\316\263\316\263\317\201\316\261\317\206\316\261'
''$'\316\222\316\257\316\275\317\204\316\265\316\277'
''$'\316\224\316\267\316\274\317\214\317\203\316\271\316\261'
''$'\316\225\316\271\316\272\317\214\316\275\316\265\317\202'
''$'\316\225\317\200\316\271\317\206\316\254\316\275\316\265\316\271\316\261'' '$'\316\265\317\201\316\263\316\261\317\203\316\257\316\261\317\202'
''$'\316\233\316\256\317\210\316\265\316\271\317\202'
''$'\316\234\316\277\317\205\317\203\316\271\316\272\316\256'
''$'\316\240\317\201\317\214\317\204\317\205\317\200\316\261'

Would it be a good idea to always have LANG=C aliases for these XDG specified folders?

As in regardless as to what your Documents folder gets renamed to it always works when you type cd Documents . Admittedly there are not that many cases where it is useful, I for example had an issue a while back where my terminal would not accept me inputting accented letters. That now seems to be fixed.

This is more of an idea that comes from Windows where regardless of what the current system localization is, you can still cd using the english name of the directory.

Opinions?

1 Like

The whole point of the XDG configuration is to separate the name presented to the user and the semantic use that folder is put to.

Adding symlinks seems like a bad UI choice.

FYI Windows has the same separation for its special folders like “Program Files”. If you use a none English version those name will be internationalised with out aliases.

I believe the issue with Unicode in Distrobox should be fixable.

Then there is xdg-user-dir that can be used for scripting.

This only leaves a small inconvenience for non-English locales, but those will typically need to switch layout sooner or later to access other files or subdirectories, so symlinks would just delay the inevitable.

However, nothing is stopping you from creating symlinks if this makes your workflow easier.

Symlinks are probably a bad idea, you are right, so I guess it seems more like an issue for file managers to solve…

At the very least dolphin seems to be having an issue with that.(unless i am doing something wrong.

Is the problem the use of non-UTF-8 filenames?
At this point in time you should only be using UTF-8 for filenames.

Are you using a legacy encoding in the file system?
If so what is your use case for doing that?