Broken native Locale support
https://github.com/oracle/graal/issues/1645 and https://github.com/oracle/graal/issues/911 suggest that non-default locales won't work properly in native mode. We should check whether we can leverage the workaround mentioned in https://stackoverflow.com/questions/61567216/graalvm-quarkus-locale-in-native-mode/61594634#61594634
If the workaround works for us, we can use it to "register" Locale.ENGLISH required by Geocoder.
Substituting java.text.DecimalFormatSymbols.getInstance(Locale) would solve the issue with String.format(Locale.ROOT, "%.1f", double) in Geocoder. I have a PoC, but it is a bit fragile and hard to generalize. I do not think it is worth having it just to solve the GeoCoder issue. Hopefully GraalVM comes with a proper non-default locale support soon https://github.com/oracle/graal/issues/2908
There is another linked issue in quarkus https://github.com/quarkusio/quarkus/issues/5244.
GraalVM 21.1 seems to bring some options control the locales embedded into the native image and we probably want to wait for https://github.com/quarkusio/quarkus/issues/5244 to provide config and programmatic access to those.
Hi @ppalaga ,
Just FYI, if it's only one no-default locale needed in native mode, we can specify it in application.properties like
quarkus.native.user-country=US
quarkus.native.user-language=en
Please take a look at https://github.com/apache/camel-quarkus/issues/2550#issuecomment-832204615 to get more details.
Cheers Freeman
if it's only one no-default locale needed in native mode, we can specify it in application.properties like
quarkus.native.user-country=US quarkus.native.user-language=en
Yes, thanks, I was not aware of those props. Indeed they may come in handy to workaround some native locale issues.
We need to adapt our documentation https://github.com/apache/camel-quarkus/pull/2601/files once quarkusio/quarkus#5244 gets fixed.
https://github.com/quarkusio/quarkus/issues/5244 has been fixed