Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

506 votes
6 answers
486871 views
What does "LC_ALL=C" do?
What does the `C` value for `LC_ALL` do in Unix-like systems? I know that it forces the same locale for all aspects but what does `C` do?
What does the C value for LC_ALL do in Unix-like systems? I know that it forces the same locale for all aspects but what does C do?
jcubic (10310 rep)
Aug 22, 2013, 07:32 AM • Last activity: Jul 30, 2025, 06:10 AM
5 votes
1 answers
10738 views
How to change regional settings in Linux, including decimal point
I was on Linux Mint, now I'm trying Ubuntu 18 main distro. At top of Gnome day of week/time is displayed. That's where I started, wanting to change it to English having set regional to Russian via GUI, as by the way I noticed time zone changes if I changed regional to US. I've read and tried this: [...
I was on Linux Mint, now I'm trying Ubuntu 18 main distro. At top of Gnome day of week/time is displayed. That's where I started, wanting to change it to English having set regional to Russian via GUI, as by the way I noticed time zone changes if I changed regional to US. I've read and tried this: How to get current or set wanted regional format in the terminal? Strangely, after sudo update-locale LC_TIME=en_CA.UTF-8 and even restart of PC, /etc/default/locale has CA, but locale in bash gives RU. And day of week on top of screen is in Russian still. Why different in file and by command? How to change language on top of screen, is it some short date variable, where to find it? As extension to above, is it possible and how to change decimal point and thousand separator each individually to what I like?
Alex Martian (1287 rep)
Jul 5, 2018, 07:45 AM • Last activity: Jul 8, 2025, 01:03 PM
2 votes
1 answers
212 views
`type` command ignores `LANG` after upgrading to `bash` 5.3 on iTerm2/macOS
I'm on macOS and I set English as the locale except for `LC_TIME`: ```bash ~ $ locale LANG="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_CTYPE="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="ja_JP.UTF-8" LC_ALL= ``` Previously, the output of `type` com...
I'm on macOS and I set English as the locale except for LC_TIME:
~ $ locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="ja_JP.UTF-8"
LC_ALL=
Previously, the output of type command was (naturally) English:
$ type bash
bash is /opt/homebrew/bin/bash
However, after upgrading to bash 5.3, the output is now in Japanese:
~ $ bash --version
GNU bash, version 5.3.0(1)-release (aarch64-apple-darwin24.4.0)
Copyright (C) 2025 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

~ $ type bash
bash は /opt/homebrew/bin/bash です
Why? --- By the way, I also have a very surprising result. type command seems NOT to be stateless. Specifically, it seems the command *remember*s the last environment in which it was previously executed:
~ $ echo $LANG
en_US.UTF-8

# The output is in Japanese.
~ $ type bash
bash は /opt/homebrew/bin/bash です

# When I override $LANG, the output is in English.
~ $ LANG= type bash
bash is /opt/homebrew/bin/bash

# As I used *simple command* in bash,
# the value of $LANG is still en_US.UTF-8.
~ $ echo $LANG
en_US.UTF-8

# Now, surprisingly, type outputs in English.
~ $ type bash
bash is /opt/homebrew/bin/bash
--- Current workaround is to use /usr/bin/type instead of the shell builtin type:
~ $ builtin type bash
bash は /opt/homebrew/bin/bash です

~ $ /usr/bin/type bash
bash is /opt/homebrew/bin/bash
--- Output of typeset -p | grep -e LC_ -e LANG (requested by a comment):
~ $ typeset -p | grep -e LC_ -e LANG
declare -x LANG="en_US.UTF-8"
declare -x LC_TERMINAL="iTerm2"
declare -x LC_TERMINAL_VERSION="3.5.14"
declare -x LC_TIME="ja_JP.UTF-8"
ynn (998 rep)
Jul 8, 2025, 01:09 AM • Last activity: Jul 8, 2025, 08:42 AM
1 votes
0 answers
45 views
Debian 12 profile locale file location?
I finally got profile locale settings to my liking. Now it shows ISO standard everywhere. But where is the conf file so I can copy it to another machine? ` administrator@debian12kde:~$ locale -a C C.utf8 en_IE en_IE@euro en_IE.iso88591 en_IE.iso885915@euro en_IE.utf8 en_IN en_IN.utf8 en_US.utf8 To a...
I finally got profile locale settings to my liking. Now it shows ISO standard everywhere. But where is the conf file so I can copy it to another machine? ` administrator@debian12kde:~$ locale -a C C.utf8 en_IE en_IE@euro en_IE.iso88591 en_IE.iso885915@euro en_IE.utf8 en_IN en_IN.utf8 en_US.utf8 To achieve the state I want to conserve, I adjusted the settings in Debian12 KDE "System Settings - Region & Language" manually.
SamTzu (81 rep)
Jul 5, 2025, 12:11 PM • Last activity: Jul 8, 2025, 08:11 AM
4 votes
1 answers
2063 views
Linux Deepin language switcher - making it smoother like in Ubuntu
I installed the latest Linux Deepin 2014.2 distro. It's a Chinese distro based on Ubuntu 14.04. The OS is great, but there's one annoying flaw - when switching language, there appears a transparent switcher, and you need to switch **again** to actually make the change happen. It looks like this: ![e...
I installed the latest Linux Deepin 2014.2 distro. It's a Chinese distro based on Ubuntu 14.04. The OS is great, but there's one annoying flaw - when switching language, there appears a transparent switcher, and you need to switch **again** to actually make the change happen. It looks like this: enter image description here I'd like to have something similar to Ubuntu's behavior (switches immediately)
yuvi (141 rep)
Jan 20, 2015, 09:27 AM • Last activity: Jun 28, 2025, 12:19 AM
4 votes
1 answers
221 views
Where can I find the source code to language pack templates?
I was curious to dig a little deeper into [this question](https://unix.stackexchange.com/q/797381/) and realised that I don't know where to look for language pack templates. But beyond basic high-level discussion in [locale-gen](https://manpages.debian.org/testing/locales/locale-gen.8.en.html), I'm...
I was curious to dig a little deeper into [this question](https://unix.stackexchange.com/q/797381/) and realised that I don't know where to look for language pack templates. But beyond basic high-level discussion in [locale-gen](https://manpages.debian.org/testing/locales/locale-gen.8.en.html) , I'm at a bit of a loss to know where to look for them. I'm particularly interested to look at how collation rules are constructed and what they look like in practical source code for well known locales such as en_US.utf-8 and en_GB-utf-8. Are these largely shared between distributions? And where are they maintained in source code? *Unfortunately google is giving me complete blanks on this one.*
Philip Couling (20391 rep)
Jun 26, 2025, 02:15 PM • Last activity: Jun 26, 2025, 03:26 PM
6 votes
1 answers
290 views
Strange default sort behaviour
I have some trouble to understand what is happening here: [guido@localhost 9]$ ls -1 Star\ Wars\ Episode\ * Star Wars Episode II Attack of the Clones.avi Star Wars Episode III Revenge of the Sith.avi Star Wars Episode I The Phantom Menace.avi Star Wars Episode IV A New Hope.avi Star Wars Episode VI...
I have some trouble to understand what is happening here: [guido@localhost 9]$ ls -1 Star\ Wars\ Episode\ * Star Wars Episode II Attack of the Clones.avi Star Wars Episode III Revenge of the Sith.avi Star Wars Episode I The Phantom Menace.avi Star Wars Episode IV A New Hope.avi Star Wars Episode VI Return of the Jedi.avi Star Wars Episode V The Empire Strikes Back.avi III\b before I\b, but II\b before III\b? Whatever is causing this, it is not behaving consistently. This is also the same sorting result I get in the GUI. I checked all the blanks are actually blanks, and there are no case difference among the filenames. How can it be? Is it skipping the roman numeral, and trying to sort after it? Other tests: [guido@localhost 9]$ find -name "Star Wars *" -print ./Star Wars Episode I The Phantom Menace.avi ./Star Wars Episode II Attack of the Clones.avi ./Star Wars Episode III Revenge of the Sith.avi ./Star Wars Episode IV A New Hope.avi ./Star Wars Episode V The Empire Strikes Back.avi ./Star Wars Episode VI Return of the Jedi.avi But: [guido@localhost 9]$ find -name "Star Wars *" -print | sort ./Star Wars Episode II Attack of the Clones.avi ./Star Wars Episode III Revenge of the Sith.avi ./Star Wars Episode I The Phantom Menace.avi ./Star Wars Episode IV A New Hope.avi ./Star Wars Episode VI Return of the Jedi.avi ./Star Wars Episode V The Empire Strikes Back.avi While: [guido@localhost 9]$ find -name "Star Wars *" -print | sort -f ./Star Wars Episode I The Phantom Menace.avi ./Star Wars Episode II Attack of the Clones.avi ./Star Wars Episode III Revenge of the Sith.avi ./Star Wars Episode IV A New Hope.avi ./Star Wars Episode V The Empire Strikes Back.avi ./Star Wars Episode VI Return of the Jedi.avi I don't think my locale may be affecting this (I also set it to en_US.utf8 anyway) as the doc suggests. What am I missing? [guido@localhost 9]$ sort --version sort (GNU coreutils) 8.22
guido (9059 rep)
Oct 10, 2015, 04:22 PM • Last activity: Jun 26, 2025, 07:34 AM
0 votes
1 answers
2102 views
Language icon is missing from the Cinnamon settings! (Debian 11 installed with Cinnamon)
Working in a multicultural environment, I recently needed to switch the language displayed in my computer GUI (Debian 11 installed with Cinnamon). And I did not manage to do it easily! I have been searching around for a while to find out how to add an additional language to my new Cinnamon installat...
Working in a multicultural environment, I recently needed to switch the language displayed in my computer GUI (Debian 11 installed with Cinnamon). And I did not manage to do it easily! I have been searching around for a while to find out how to add an additional language to my new Cinnamon installation. Obviously, reading from the internet, there should be a **Languages icon** in Cinnamon **System Settings** panel. But this icon does not exist on my installation. Where did it go? **How can I have it back?** The workaround I used: - Close the Cinnamon session and open a Gnome session - Go to the Gnome system settings, choose the Country and Language menu, and select the language. - Then go back to a Cinnamon session
user1185081 (261 rep)
May 16, 2022, 07:36 AM • Last activity: Jun 19, 2025, 12:05 AM
35 votes
6 answers
7896 views
How can I make “ls” show dotfiles first while staying case-insensitive?
Create the following files in a directory. $ touch .a .b a b A B 你好嗎 My default `ls` order ignores the presence of leading dots, intermingling them with the other files. $ ls -Al total 0 -rw-r--r-- 1 sparhawk sparhawk 0 Jun 8 17:03 a -rw-r--r-- 1 sparhawk sparhawk 0 Jun 8 17:03 .a -rw-r--r-- 1 sparh...
Create the following files in a directory. $ touch .a .b a b A B 你好嗎 My default ls order ignores the presence of leading dots, intermingling them with the other files. $ ls -Al total 0 -rw-r--r-- 1 sparhawk sparhawk 0 Jun 8 17:03 a -rw-r--r-- 1 sparhawk sparhawk 0 Jun 8 17:03 .a -rw-r--r-- 1 sparhawk sparhawk 0 Jun 8 17:03 A -rw-r--r-- 1 sparhawk sparhawk 0 Jun 8 17:03 b -rw-r--r-- 1 sparhawk sparhawk 0 Jun 8 17:03 .b -rw-r--r-- 1 sparhawk sparhawk 0 Jun 8 17:03 B -rw-r--r-- 1 sparhawk sparhawk 0 Jun 8 17:06 你好嗎 I [can](https://superuser.com/questions/448291/how-can-i-make-ls-show-dotfiles-first) [change](https://unix.stackexchange.com/questions/53598/alphabetizing-names-in-ls-alias-with-files-not-intermingled) LC_COLLATE to put the dotfiles first. $ LC_COLLATE=C ls -Al total 0 -rw-r--r-- 1 sparhawk sparhawk 0 Jun 8 17:03 .a -rw-r--r-- 1 sparhawk sparhawk 0 Jun 8 17:03 .b -rw-r--r-- 1 sparhawk sparhawk 0 Jun 8 17:03 A -rw-r--r-- 1 sparhawk sparhawk 0 Jun 8 17:03 B -rw-r--r-- 1 sparhawk sparhawk 0 Jun 8 17:03 a -rw-r--r-- 1 sparhawk sparhawk 0 Jun 8 17:03 b -rw-r--r-- 1 sparhawk sparhawk 0 Jun 8 17:06 你好嗎 Unfortunately this makes the sort order case-sensitive, i.e. A and B precede a and b. Is there a way to print dotfiles first while staying case-insensitive (A and a precede B and b)? ## Edit: attempting to modify LC_COLLATE None of the answers so far fully replicate the functionality of ls easily. Conceivably, I could wrap some of them in a function, but this would have to include some detailed code on (e.g.) how to work with no argument vs. supplying a directory as an argument. Or how to deal with an explicit -d flag. Alternatively, I thought that maybe there could be a better LC_COLLATE to use. However, I can't seem to make that work. I'm currently using LC_COLLATE="en_AU.UTF-8". I checked /usr/share/i18n/locales/en_AU (although I'm not sure if this is the right file, as I can't see any reference to UTF-8); I found the following. LC_COLLATE copy "iso14651_t1" END LC_COLLATE /usr/share/i18n/locales/iso14651_t1 contains copy "iso14651_t1_common". Finally, /usr/share/i18n/locales/iso14651_t1_common contains IGNORE;IGNORE;IGNORE; # 47 . I deleted this line, ran sudo locale-gen, and restarted my computer. Unfortunately, this changed nothing.
Sparhawk (20499 rep)
Jun 8, 2016, 07:15 AM • Last activity: Jun 5, 2025, 01:24 PM
2 votes
2 answers
382 views
LOCALE: display properties of a LOCALE
I am looking for a locale with a particular set of features. Using this simple script I can see the date format of any installed locale. #!/bin/bash LC_TIME=$1 date +%x That's fine. But locales control other features and I want to see them too. In my current issue, I want Thunderbird list dates to s...
I am looking for a locale with a particular set of features. Using this simple script I can see the date format of any installed locale. #!/bin/bash LC_TIME=$1 date +%x That's fine. But locales control other features and I want to see them too. In my current issue, I want Thunderbird list dates to show as 2018/06/30 and I want my panel clock to show the time in 12-hour format. How can I add to this script to display the other effects of the locale?
Stephen Boston (2526 rep)
Jun 30, 2018, 10:47 PM • Last activity: Jun 4, 2025, 07:43 AM
2 votes
1 answers
89 views
Where are the LC_ locale global environment variables configured?
I want to change the language of my computer. I tried doing this with `sudo dpkg-reconfigure locales`. this changed the `LANG` environment variable in `/etc/default/locale` but none of the `LC` environment variables changed. `/etc/default/locale` says `# File generated by update-locale` so I presume...
I want to change the language of my computer. I tried doing this with sudo dpkg-reconfigure locales. this changed the LANG environment variable in /etc/default/locale but none of the LC environment variables changed. /etc/default/locale says # File generated by update-locale so I presume there is some correct way of generating this file so that the LC variables are as desired. Oddly, after changing the LC_ variables by hand and sourcing /etc/default/locale when I rerun update-locale the LC variables inside /etc/default/locale keep their value rather than resetting to the old one. These also remain the same after a sudo dpkg-reconfigure locales. So may you are meant to just change these variables by hand and thereafter all the tools will keep them the same?
Att Righ (1412 rep)
May 27, 2025, 03:33 PM • Last activity: May 27, 2025, 04:29 PM
2 votes
1 answers
2015 views
Can not switch from en_US.US-ASCII to en_US.UTF8
I am using many non ASCII characters in my filenames and up untill now everyone worked correctly. I am running **openSUSE Tumbleweed** and currently updated to the **20191118**. I have noticed that my `locale` output is now showing ``` LANG=en_US.US-ASCII LC_CTYPE="C" LC_NUMERIC="C" LC_TIME="C" LC_C...
I am using many non ASCII characters in my filenames and up untill now everyone worked correctly. I am running **openSUSE Tumbleweed** and currently updated to the **20191118**. I have noticed that my locale output is now showing
LANG=en_US.US-ASCII
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=C
I have tried to change settings by using localectl set-locale LANG="en_US.utf-8" but no success, since after the update they seem to reset. I am not sure whether this is an actual bug somewhere (in Dolphin, KDE / Plasma, openSUSE, etc.) or some settings have changed?
porvik (41 rep)
Nov 20, 2019, 03:04 PM • Last activity: May 18, 2025, 05:08 PM
3 votes
1 answers
209 views
How are leading spaces handled in sort -k?
I have a file named `test` with the following content: ``` 12288 4096 505 ``` Note that there's a single space before 12288, two spaces before 4096 and three spaces before 505. When I run GNU `sort -k1.1,1.3 test` on my Ubuntu system, I get the following output: ``` 505 12288 4096 ``` I expected it...
I have a file named test with the following content:
12288
  4096
   505
Note that there's a single space before 12288, two spaces before 4096 and three spaces before 505. When I run GNU sort -k1.1,1.3 test on my Ubuntu system, I get the following output:
505
 12288
  4096
I expected it to do a lexicographic sorting on the first three characters (including spaces) based on their ASCII values which would have produced the following output:
505
  4096
 12288
Running
=C sort -k1.1,1.3 test
gives me the expected output. Here's the output I get when I run
:
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
Could you please explain what the command is doing when I don't pass LC_ALL=C to it?
russell.price (53 rep)
Apr 29, 2025, 04:26 PM • Last activity: Apr 29, 2025, 07:51 PM
0 votes
0 answers
22 views
How can I apply a function to cells in place in Calc?
I have a large table of numbers using the wrong decimal separator for my locale (dot instead of comma), so LibreOffice Calc does not parse them as numbers, but as strings. I can apply this function to a cell (A1 in this case) to parse it as a number: `NUMBERVALUE(A1; "."; "")` I know that I can crea...
I have a large table of numbers using the wrong decimal separator for my locale (dot instead of comma), so LibreOffice Calc does not parse them as numbers, but as strings. I can apply this function to a cell (A1 in this case) to parse it as a number: NUMBERVALUE(A1; "."; "") I know that I can create a side table where I would calculate the values using cell references and copy the results back to the original table. But that is impractical for a large table. How can I apply the function to all these cells at once without using any other cells?
matj1 (141 rep)
Apr 28, 2025, 11:57 AM
0 votes
2 answers
2442 views
Ubuntu locale setting is invalid: No such file or directory
I've tried setting my locales in ubuntu 20 (I did it successfully in the last x years) unfortunatelly now I can't due something missing: ``` $ locale locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_MESSAGES to default locale: No such file or directory l...
I've tried setting my locales in ubuntu 20 (I did it successfully in the last x years) unfortunatelly now I can't due something missing:
$ locale     
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=hu_HU.UTF-8
LANGUAGE=hu_HU.UTF-8
LC_CTYPE="C.UTF-8"
LC_NUMERIC="C.UTF-8"
LC_TIME="C.UTF-8"
LC_COLLATE="C.UTF-8"
LC_MONETARY="C.UTF-8"
LC_MESSAGES="C.UTF-8"
LC_PAPER="C.UTF-8"
LC_NAME="C.UTF-8"
LC_ADDRESS="C.UTF-8"
LC_TELEPHONE="C.UTF-8"
LC_MEASUREMENT="C.UTF-8"
LC_IDENTIFICATION="C.UTF-8"
LC_ALL=C.UTF-8
**What I have tried:**
sudo localectl set-locale LC_ALL=hu_HU.UTF-8
Failed to issue method call: Invalid Locale data.
(I've tried also with c.UTF-8 the same output)
$ sudo update-locale
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = "hu_HU.UTF-8",
	LC_ALL = "C.UTF-8",
	LANG = "hu_HU.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

sudo dpkg-reconfigure locales
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = "hu_HU.UTF-8",
	LC_ALL = "C.UTF-8",
	LANG = "hu_HU.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline

$ sudo nano /etc/default/locale
edited here the LANG, LANGUAGE, LC_ALL settings as above, without any effect restarted many times the whole system... what did I wrong? I don't care of my preffered locale setting, it should more work now without any issue. Thanks for helping.
Erkman (3 rep)
Mar 6, 2023, 10:27 PM • Last activity: Apr 22, 2025, 04:42 PM
5 votes
1 answers
560 views
Why don't browsers respect LC_TIME?
I'm using en_US for system language, but pl_PL for date format. It works OK in the entire system, and running `date` gives me a correctly formatted date. It also shows Polish as Time format in the GUI Language Settings. But in any browser (Chrome, Chromium, Firefox) I have US format! For example in...
I'm using en_US for system language, but pl_PL for date format. It works OK in the entire system, and running date gives me a correctly formatted date. It also shows Polish as Time format in the GUI Language Settings. But in any browser (Chrome, Chromium, Firefox) I have US format! For example in Date input, Date in JS etc... console.log(new Date().toLocaleString()) // shows 9/26/2021, 3:29:46 PM // should be 26.09.2021, 15:29:46 locale: LANG=en_US.UTF-8 LANGUAGE=en_US LC_CTYPE="en_US.UTF-8" LC_NUMERIC=pl_PL.UTF-8 LC_TIME=pl_PL.UTF-8 LC_COLLATE="en_US.UTF-8" LC_MONETARY=pl_PL.UTF-8 LC_MESSAGES="en_US.UTF-8" LC_PAPER=pl_PL.UTF-8 LC_NAME=pl_PL.UTF-8 LC_ADDRESS=pl_PL.UTF-8 LC_TELEPHONE=pl_PL.UTF-8 LC_MEASUREMENT=pl_PL.UTF-8 LC_IDENTIFICATION=pl_PL.UTF-8 LC_ALL= To reproduce this use: https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_tolocalestring , or create a file called index.html with the following contents:
Hi!
    
     console.log(new Date().toLocaleString())
And then open this file using any value of LC_ALL and browser combination you care to try:
LC_ALL=el_GR.utf8 firefox index.html
Then, look at the javascript console (usually available by pressing F12) and you will see the date format ignores the LC setting. I also have en for language and pl for dates on a Windows machine and it works fine. Why can't Linux do this? I was dealing with this for year now. All I can find in google is people with similar issue but without solution or problems with date format in system. System: Linux Mint 20 Xfce
chojnicki (151 rep)
Sep 26, 2021, 02:23 PM • Last activity: Apr 22, 2025, 11:59 AM
3 votes
1 answers
7816 views
Cannot install packages on Kali Linux due to broken locale settings
I have a Kali Linux where I cannot install any packages. `locale` is not working, and I cannot install it. What can I do? I changed `sources.list` but it's of no help, I tried `sudo dpkg-reconfigure locales` it tells me: Can't exec "locale": No such file or directory at /usr/share/perl5/Debconf/Enco...
I have a Kali Linux where I cannot install any packages. locale is not working, and I cannot install it. What can I do? I changed sources.list but it's of no help, I tried sudo dpkg-reconfigure locales it tells me: Can't exec "locale": No such file or directory at /usr/share/perl5/Debconf/Encoding.pm line 16. Use of uninitialized value $Debconf::Encoding::charmap in scalar chomp at /usr/share/perl5/Debconf/Encoding.pm line 17. dpkg: error: configuration error: /etc/dpkg/dpkg.cfg.d/multiarch:1: unknown option 'foreign-architecture' /usr/sbin/dpkg-reconfigure: locales is not installed
Giorgi Gavasheli (31 rep)
Aug 24, 2016, 09:50 AM • Last activity: Apr 10, 2025, 12:03 AM
33 votes
4 answers
34533 views
What's the default order of Linux sort?
For a long period I thought the default behavior of the `sort` program was using ASCII order. However, when I input the following lines into `sort` without any arguments: # @ I got: @ # But according to the ASCII table, `#` is 35 and `@` is 64. Another example is: A a And the output is: a A Can anyb...
For a long period I thought the default behavior of the sort program was using ASCII order. However, when I input the following lines into sort without any arguments: # @ I got: @ # But according to the ASCII table, # is 35 and @ is 64. Another example is: A a And the output is: a A Can anybody explain this? By the way, what is 'dictionary-order' when using sort -d?
old_bear
Jul 19, 2012, 06:16 AM • Last activity: Apr 8, 2025, 03:02 PM
0 votes
1 answers
241 views
setting system locale to C...what is the appropriate charmap?
i use arch and want to set my whole system's locale to `C` (and only `C`). `C` isn't listed inside `/etc/locale.gen` (and only `en_US.UTF-8 UTF-8` is uncommented) but `C` is found inside `/usr/share/i18n/locales/`. i ran command `localectl set-locale C` and logged out/in, and command `locale` shows...
i use arch and want to set my whole system's locale to C (and only C). C isn't listed inside /etc/locale.gen (and only en_US.UTF-8 UTF-8 is uncommented) but C is found inside /usr/share/i18n/locales/. i ran command localectl set-locale C and logged out/in, and command locale shows C for everything -- good. my questions are: * do i need to comment out line en_US.UTF-8 UTF-8 inside file locale.gen and run command locale-gen to remove the other undesired locale remnants from my system? * before running command locale-gen should i append C to file locale.gen, and if so, what `` is standard for it? i look inside directory /usr/share/i18n/charmaps/ but do not see anything like C.gz inside. is UTF-8.gz correct or ANSI_X3.110-1983.gz or an ISO-*/ISO_* one? i run command localectl list-locales and see: C.UTF-8 en_US.UTF-8 does this mean my locale is not entirely and only C and i have unwanted remnants of others?
leetbacoon (383 rep)
Mar 10, 2025, 06:04 AM • Last activity: Mar 10, 2025, 08:23 AM
1 votes
1 answers
1739 views
How do I get the language for messages?
Is there a single command I can use to get the language to use for messages or do I have to check `LC_MESSAGES`, `LC_ALL`, `LANG` etc. in some specific order?
Is there a single command I can use to get the language to use for messages or do I have to check LC_MESSAGES, LC_ALL, LANG etc. in some specific order?
August Karlstrom (1986 rep)
Apr 29, 2015, 05:42 AM • Last activity: Mar 6, 2025, 10:42 AM
Showing page 1 of 20 total questions