-
-
Notifications
You must be signed in to change notification settings - Fork 181
Open
Description
When experting a UTF-8 Java applications to a Gradle project, Unicode characters are not displayed correctly when though Windows is using code page 65001.
Step 1 - run Java program with JBang
C:\> jbang run JvmRuntimeOpts.java
--- 🚀 JVM Runtime Options (VM Arguments) ---
No explicit JVM Runtime Options found (default settings are in use).
--- 📝 Application Arguments ---
No Application Arguments were passed to the main method.
--- ✅ Execution Complete ---
Step 2 - export to Gradle run using Gradle
C:\> jbang export gradle JvmRuntimeOpts.java
C:\> cd JvmRunTimeOpts
C:\> .\gradlew run
--- ? JVM Runtime Options (VM Arguments) ---
Option 1: -Dfile.encoding=UTF-8
Option 2: -Duser.country=ZA
Option 3: -Duser.language=en
Option 4: -Duser.variant
--- ? Application Arguments ---
No Application Arguments were passed to the main method.
--- ? Execution Complete ---
The fix is to also add Java runtime options:
- -Dstdout.encoding=UTF-8
- -Dstderr.encoding=UTF-8
Metadata
Metadata
Assignees
Labels
No labels