Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant