My operating system is Windows 10, and the system's default code page is GBK. The JDK version is 21, and the Gradle version is 8.5. I use chcp 1252 to change the console encoding. In order to check the System.out.charset of the gradle daemon process, I use System.out.print(System.out.charset()) in build.gradle,it is “utf-8”, while the VM property stdout.encoding of the Gradle daemon process is 1252. If I run a class file that outputs System.out.charset using the java command, the output of System.out.charset and stdout.encoding are both 1252. Why does the Gradle daemon output not equal stdout.encoding?
what i have tried:At first, I thought it was because stdout.encoding does not support the character set I specified. However, running a class file that outputs System.out.charset directly using the java command shows that the character set I specified is supported. I expected that System.out.charset should equal stdout.encoding. Please forgive me for my poor English.
stdout.encoding
system property of the daemon help?