Skip to content
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

Localization of german Double values #1355

Open
chr1syy opened this issue Mar 30, 2022 · 0 comments
Open

Localization of german Double values #1355

chr1syy opened this issue Mar 30, 2022 · 0 comments

Comments

@chr1syy
Copy link

chr1syy commented Mar 30, 2022

Hello,

i've built an app with tornadofx to save double values into a database with an editable tableview. Everything works fine so far, but since the customers are germans i'm trying to get the javafx.utils to parse "," instead of "." for double values.

Is there actually any possibility or is it possible to add support for localized number formats? Setting a Locale on NumberFormat doesnt work, since the parsing happens within tornadofx.

The actual error:

java.lang.NumberFormatException: For input string: "7,5" at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043) at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110) at java.lang.Double.parseDouble(Double.java:538) at java.lang.Double.valueOf(Double.java:502) at javafx.util.converter.DoubleStringConverter.fromString(DoubleStringConverter.java:49) at javafx.util.converter.DoubleStringConverter.fromString(DoubleStringConverter.java:35) at javafx.scene.control.cell.CellUtils.lambda$createTextField$1(CellUtils.java:248)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant