SignalK / signalk-server-java

DEPRECATED - see https://github.com/SignalK/signalk-java
Apache License 2.0
6 stars 9 forks source link

Locale problem with decimal formats #7

Closed tkurki closed 9 years ago

tkurki commented 9 years ago

Java server outputs invalid JSON numbers and throws internal errors if the locale has something else than period character as the decimal separator.

A quick fix is to explicitly set the locale of the jvm in startpc:

EXT="-Djava.util.Arrays.useLegacyMergeSort=true -Duser.country=EN -Duser.language=en".

rob42 commented 9 years ago

Pinned the decimal format to Locale.ENGLISH, and also disabled scientific notation on long doubles.