[lug] Make caja file manager use LC_COLLATE?

Jed S. Baer blug at jbaer.cotse.net
Sat Jul 24 10:12:40 MDT 2021


On Sat, 24 Jul 2021 01:26:18 -0600
Davide Del Vento wrote:

> I've found that in similar cases rather than searching online or asking in
> forums, it's much easier and faster to just look at the source code.

  $ tar tzf caja-1.24.0.tar.gz | wc -l
  653

> Admittedly, I never had to do that with Gnome/MATE core software, so it is
> possible that I am not aware of the specific challenges of that option for
> such codes for which it might not be "much easier and faster" as I claim
> :-)

My previous attempts at diving into the bowels of GTK were at best
frustrating. The "maze of twisty passages" applies in spades.

> Let us know what you find out!

grep is helpful, but I'll note that it doesn't find anything in the docs
re. collation.

A bit of searching based on
  return g_list_sort (list, (GCompareFunc) g_utf8_collate);

Gets me here:
https://developer.gnome.org/glib/stable/glib-running.html#setlocale
> A number of interfaces in GLib depend on the current locale in which an
> application is running. Therefore, most GLib-using applications should
> call setlocale (LC_ALL, "") to set up the current locale.

And LC_ALL on my system (login) is C.UTF8. But this appears to be a dead
end. C.UTF8 should be similar to C, in that (I think) it's a binary sort
order, except UTF aware. This should have no effect on ASCII file names,
vs. a locale of "C".

I note that "ls" produces proper results. (Proper in my case being pure
alphabetic sort by name.)

-- 
All operating systems suck, but Linux just sucks less
 - Linus Torvalds


More information about the LUG mailing list