0

This may be a dup of an older question, but I can't seem to narrow down my searching to get the answer I need from the flood of unrelated results.

I used to have export LC_ALL=C in my .bashrc, but I just recently figured out that Gnome terminal (or some libraries it uses?) doesn't support the "C" locale anymore. I hardly ever use the Gnome desktop, so it took me a long, long time to even notice the issue, and then still longer to figure out the cause.

Is there another locale setting with the same collate order as "C"? At least over the ASCII character (sub)set?

  • Are you sure? "C" locale is mandatory. In any case, "C" is ASCII (so it may define just 127 characters (and control codes). Maybe it want "C.UTF-8" because it requires UTF-8 input. Note: locales are handled by the operating system, not by terminals. I think most English locales may preserve C order in ASCII domain – Giacomo Catenazzi Jan 05 '22 at 07:54
  • @GCatenazzi: There may be more involved than I'm aware of, but what I know for sure: If I have "export LC_ALL=C" in my .bashrc, and login to a Gnome session, and try to open a terminal (from "utilities"), it doesn't work, the terminal never opens, dies on launch. If I comment out that one line of my .bashrc, I can open a terminal in Gnome desktop with no issue. With C locale: ` $ ls -1 test*` ` test.sv` ` testlib.sv` Without C locale: ` $ ls -1 test*` ` testlib.sv` ` test.sv` I want the "C" sort order. – user3068400 Jan 07 '22 at 00:58
  • I can't figure out the markup syntax to get my 'ls' example to format as code. – user3068400 Jan 07 '22 at 01:00
  • `LANG=C ls`. You can set locales per command. But I would check also the reason of first bug. Start the terminal, uncommend the line, and execute `bash` in the terminal. Now you should get the error. You may want to use `C.UTF8` (maybe you are using characters outside ASCII). `locale -a` in a terminal show the locale locally installed. – Giacomo Catenazzi Jan 07 '22 at 05:56

0 Answers0