Artix Linux Forum

Artix Linux => System => Topic started by: Funami on 09 December 2021, 09:49:20

Title: [SOLVED] locale/language issues
Post by: Funami on 09 December 2021, 09:49:20
Problems I have:
No.1

When I'm in a directory with an umlaut (e.g. aä), then java fails:
Code: [Select]
$ basename $PWD

$ cat Test.java
public class Test {
  public static void main(String[] args) { System.out.println("a"); }
}
$ javac -cp . Test.java && java Test
Error: Could not find or load main class Test
When I move that file to the home directory, it works:
Code: [Select]
$ cp Test.java ~
$ cd ~
$ javac -cp . Test.java && java Test
a

No.2
When I'm using ranger as  terminal file manager, the "aä" folder doesnt get displayed correctly.

Details
I'm using s6 as init system and sway as WM.
Code: [Select]
$ cat /etc/locale.conf
LANG=de_DE.utf8
$ locale -a
C
POSIX
de_DE.utf8
en_US.utf8
$ locale
LANG=en_US.utf8
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
And in my .bashrc I have:
Code: [Select]
export LC_ALL=C
export LANG=en_US.utf8
export LANGUAGE=en_US:de_DE

I wonder what I'm doing wrong.
Title: Re: locale/language issues
Post by: Funami on 09 December 2021, 10:12:56
Solved it by myself (thanks for anyone who looked at this). Seems like using
Code: [Select]
export LC_ALL=C
in .bashrc caused all these problems.
Title: Re: [SOLVED] locale/language issues
Post by: strajder on 09 December 2021, 10:26:02
Setting LC_ALL should be enough, there is no need to separately set other variables. By the way, it should be en_US.UTF-8, not en_US.utf8.

https://wiki.archlinux.org/title/Locale
Title: Re: [SOLVED] locale/language issues
Post by: Funami on 09 December 2021, 10:32:36
I see, thanks. Changed it to UTF-8 now.  :)