Open hyranno opened 1 month ago
I could not reproduce this issue, please verify If this issue is still occurring with the latest GraalVM version, also it might be useful to add "-J-Dfile.encoding=UTF-8" to your build command
Thank you for the response.
I tried with latest (23.0.1+11.1 (build 23.0.1+11-jvmci-b01)) but still having this issue.
I updated native-image.properties
as output of agent has changed :
Args = \
--no-fallback \
-J-Dfile.encoding=UTF-8
Adding "-encoding utf8" to javac
command and "-J-Dfile.encoding=UTF-8" to native-image.properties
does not help.
I forgot to write detail for the run command. At line 2, you might need to right-click tray icon and close the window of this program to collect metadata.
With Java, it works as expected. Running native, it shows wrong characters. Other UIs or strings seems like working fine.
Describe the Issue
Running built native image on Windows, AWT component
MenuItem
shows wrong characters.MenuItem
onSystemTray
PopupMenu
shows characters with inverted byte order. Other OSs or AWT components are unverified.Using the latest version of GraalVM can resolve many issues.
GraalVM Version
OpenJDK Runtime Environment GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30)
Operating System and Version
Windows 22H2 (19045.4894)
Diagnostic Flag Confirmation
-H:ThrowMissingRegistrationErrors=
flag.Run Command
Expected Behavior
AWT MenuItem on SystemTray PopupMenu shows "Reproduce"
Actual Behavior
AWT MenuItem on SystemTray PopupMenu shows "εζηηζΌζηζζ". Each character has inverted byte order of UTF-16 "Reproduce".
Steps to Reproduce
Put files in current directory :
Reproduce.java
native-image.properties
fontconfig.properties is the copy of %JAVA_HOME%/lib/fontconfig.properties.src
Then run the following commands (described above) with several mouse inputs.
You might need to right-click the tray icon and close the window of this program to collect metadata.
Then right-click the tray icon and check if the
MenuItem
in popup menu shows right characters.Additional Context
Without
java_home/conf/fonts/fontconfig.properties
,MenuItem
does not show any characters. Setting system propertyjava.home
for it runtime.Run-Time Log Output and Error Messages
No response