pon., 7 kwi 2025 o 01:47 Zoran Avtarovski <zo...@sparecreative.com> napisał(a):
>
> Thanks Lukasz, Uti,
>
> The issue indeed was how Java treated numbers after Java 8.
>
> After a inordinate amount of searching on how to change the solution was
> to set the locale extension on how to treat numbers.
>
> Instead of just creating a Locale using the language code I used a local
> builder extension to set the number units (NU) as such:
>
> locale = new
> Locale.Builder().setLanguage(localeStr).setExtension(Locale.UNICODE_LOCALE_EXTENSION,
> "nu-latn").build();
>
> This keeps the locale as Arabic/Pashto/etc but forces display of numbers
> in Latin form which is what we needed.
>
> Lukasz, I had a look at your fix and I think by applying the above code
> in the I18N Interceptor in Struts 7 you can treat the issue at the
> source and numbers are displayed correctly.

Thanks for the hint, yet I'm not sure if this is expected behaviour.
Maybe having this as a configuration option would make more sense,
allowing users to decide when to use it. This change impacts
formatting of all numbers so it can be devastating in some cases.

Feel free to register a ticket in JIRA!


Regards
Łukasz

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to