0

Converter not displaying correct format on Chromium-based browsers

asked 2021-05-08 00:08:11 +0800

Jtt gravatar image Jtt
107 3

Hello!

I found out that, using converter, numbers are not correctly displayed in Chromium browsers. This includes, as far as I've tried, Google Chrome, Vivaldi, Midori and new MS Edge. This does not happen on Firefox.

I'm using the built-in converter formatedNumber converter, using the expression '#,##0.00', so numbers come in a format like 1000 -> 1,000.00. Again, this is correctly displayed on firefox, but other browsers do it the wrong way around, like 1000 -> 1.000,00.

I initially thought it was bound to the browser language, but the issue persist on both spanish and english.

I can easily control the output from back-end, add a little hard-converter myself or simply change the label element for a decimalbox and make it read-only, but I think this is something worth pointing out.

I prepared a little fiddle demostrating this and I do recommend checking in a few different browsers, likeFirefox and Google Chrome.

https://zkfiddle.org/sample/3jf61rb/1-Format-issue-on-Chromium-based-browsers

I may be overlooking something, so I first check here before properly calling it a bug or something like that.

Cheers!

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-05-11 14:37:07 +0800

hawk gravatar image hawk
2837 1 5
http://hawkphoenix.blogsp... ZK Team

The built-in converter is implemented by org.zkoss.bind.converter.FormatedNumberConverter. It determines the decimal point by current server locale instead of a browser.If you don't set locale, it call java.util.Locale.getDefault().

The doc about determining the locale.

Please check your server configuration and java code.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2021-05-08 00:08:11 +0800

Seen: 8 times

Last updated: May 11

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More