-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnsupportedEncodingException when running native-image generated binary #1370
Comments
Looks like Charset cs = lookupCharset(csn) is null. Probably not all characters are included in the native-image generation:
Substition
How to resolve the issue?
Result:
Tested on Linux sergej-P50 4.18.0-18-generic #19-Ubuntu SMP Tue Apr 2 18:13:16 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux with sergej@sergej-P50:~/Downloads$ native-image --version |
@SergejIsbrecht Your solution works flawlessly, thanks. However, I found another problem. LocalDate.now() returns 1970-01-01. I don't think it's somehow related to this issue, so should I open another one? |
Please open a new issue. At first it sounded you used #currentTimeMillis in the static class init block. But if its only on widows it is probably a bug. |
Windows is not supported yet. There are many things that are not implemented yet for Windows, and we are actively working on it. |
@SergejIsbrecht thanks for the suggestion. I am closing this issue since using the |
Initial conditions:
Result:
at java.lang.StringCoding.decode(StringCoding.java:190)
at java.lang.String.(String.java:426)
at java.lang.String.(String.java:491)
App run with graalvm or openjdk works without any issues.
Changing case of "ISO" does not make any difference.
App source code in attachment.
Main.java.txt
The text was updated successfully, but these errors were encountered: