On Tue, 14 Feb 2017 21:52:01 +0000 (UTC) Mike Gran <spk...@yahoo.com> wrote: [snip] > > In particular, filenames are *not*, nor can they be mapped to, > > Unicode > > > strings in Linux. > > True. Linux should follow OpenBSD and make all locales UTF-8.
Filenames and locales are not necessarily related. When you access a networked file system, you get the filename encoding you are given, which may or may not be the same as the particular locale encoding on your particular machine on one particular day, and may or may not be a unicode encoding. Glib, for example, enables you to set this with the G_FILENAME_ENCODING environmental variable, and has separate g_filename_to_utf8() and g_filename_from_utf8() functions for this purpose. You can tie the filename encoding to the locale encoding by defining the G_BROKEN_FILENAMES environmental variable but that is deprecated (the name suggests what they thing about that idea). You may possibly agree with this: I am not clear from your post what connection you were making between locales and filenames. But if OpenBSD requires all _filenames_ to be in valid UTF-8, that is a bad decision in my view. Linux is capable of treating filenames as just a null-terminated array of bytes with '/' as the directory separator. It is encoding agnostic, and that works just fine.