Ubuntu 22.04LTS
perl -e saída:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_GB:pl",
LC_ALL = (unset),
LC_MEASUREMENT = "Default.UTF-8",
LC_MONETARY = "es_ES.UTF-8",
LC_NUMERIC = "es_ES.UTF-8",
LC_TIME = "pl_PL.UTF-8",
LANG = "en_GB.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_GB.UTF-8").
Tentei remover/limpar locale, reinstalar, locale-gen e também sudo dpkg-reconfigure locales, mas nada mudou. Tenho en_GB.UTF-8, pl_PL.UTF-8, es_ES.UTF-8 instalados.
localectl list-locales retorna:
C.UTF-8
en_GB.UTF-8
es_ES.UTF-8
pl_PL.UTF-8
localidade retorna:
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_GB.UTF-8
LANGUAGE=en_GB:pl
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC=es_ES.UTF-8
LC_TIME=pl_PL.UTF-8
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY=es_ES.UTF-8
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT=Default.UTF-8
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=
E tenho problema semelhante com Java 17, quando imprimo
System.out.println("file.encoding: " + System.getProperty("file.encoding"));
System.out.println("def charset: " + Charset.defaultCharset() );
a saída é:
file.encoding: ANSI_X3.4-1968
def charset: US-ASCII
Como consertar isso? minha localidade deve ser en_GB.UTF-8