-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Describe the Issue
JVM
native-image
Using the latest version of GraalVM can resolve many issues.
- I tried with the latest version of GraalVM.
GraalVM Version
java version "25" 2025-09-16 LTS
Java(TM) SE Runtime Environment Oracle GraalVM 25-dev+37.1 (build 25+37-LTS-jvmci-b04)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 25-dev+37.1 (build 25+37-LTS-jvmci-b04, mixed mode, sharing)
Operating System and Version
Windows 11 22631.3880
Troubleshooting Confirmation
- I tried the suggestions in the troubleshooting guide.
Run Command
Test
Expected Behavior
stdout.encoding is ms936
System.console().charset().name() is x-mswin-936
Actual Behavior
stdout.encoding is ms936
System.console().charset().name() is UTF-8
Steps to Reproduce
import static java.lang.IO.println;
void main() {
println("file.encoding is " + System.getProperty("file.encoding"));
println("sun.jnu.encoding is " + System.getProperty("sun.jnu.encoding"));
println("native.encoding " + System.getProperty("native.encoding"));
println("stdout.encoding is " + System.getProperty("stdout.encoding"));
println("stderr.encoding is " + System.getProperty("stderr.encoding"));
println("stdin.encoding is " + System.getProperty("stdin.encoding"));
println("System.console().charset().name() is " + System.console().charset().name());
}
Additional Context
No response
Run-Time Log Output and Error Messages
JVM Execution Result:
file.encoding is UTF-8
sun.jnu.encoding is GBK
native.encoding GBK
stdout.encoding is ms936
stderr.encoding is ms936
stdin.encoding is ms936
System.console().charset().name() is x-mswin-936
native-native Execution Result:
file.encoding is UTF-8
sun.jnu.encoding is GBK
native.encoding GBK
stdout.encoding is ms936
stderr.encoding is ms936
stdin.encoding is ms936
System.console().charset().name() is UTF-8