When I compile a Java code with multibyte characters using javac command, failed compile.
Java Source Code
public class Test {
public static void main(String[] args) {
System.out.println("↓");
}
}
Procedures
docker run -v $(pwd):/work -it -w /work \
ghcr.io/graalvm/graalvm-ce:22.0.0.2 bash
bash-4.4# javac Test.java
Test.java:3: error: unmappable character (0xE2) for encoding US-ASCII
System.out.println("???");
^
Test.java:3: error: unmappable character (0x86) for encoding US-ASCII
System.out.println("???");
^
Test.java:3: error: unmappable character (0x93) for encoding US-ASCII
System.out.println("???");
^
bash-4.4#
Solution for this behavior
I've fixed to change environment variable value of LANG to C.utf8 from en_US.UTF-8.
docker run -v $(pwd):/work -it -w /work \
-e LANG=C.utf8 \
ghcr.io/graalvm/graalvm-ce:22.0.0.2 bash
It's working fine.
bash-4.4# javac Test.java
bash-4.4# java Test
↓
bash-4.4#
Proposal
I will propose to change default LANG value to C.utf8 from en_US.UTF-8.
p.s:
The en_US.UTF-8 not installed on container by default.
bash-4.4# locale -a
C
C.utf8
POSIX
bash-4.4#
When I compile a Java code with multibyte characters using
javaccommand, failed compile.Java Source Code
Procedures
Solution for this behavior
I've fixed to change environment variable value of
LANGtoC.utf8fromen_US.UTF-8.It's working fine.
Proposal
I will propose to change default LANG value to
C.utf8fromen_US.UTF-8.p.s:
The
en_US.UTF-8not installed on container by default.