PuffinPlot issue tracker

Bug: a88/80a

ID : 80a17c40-a977-405b-b1ab-0ef2c5ed1c2e
Short name : a88/80a
Status : fixed
Severity : minor
Assigned :
Reporter : Pontus Lurcock <pont@talvi.net>
Creator : Pontus Lurcock <pont@talvi.net>
Created : Thu, 16 Oct 2014 15:49:13 +0000
Target : 1.03
Summary : Check locales for all float parsing and writing

Comment: --------- Comment ---------
ID: 3a9beead-4c23-4c38-84ad-1ab15007f0de
Short name: a88/80a/3a9
From: Pontus Lurcock <pont@talvi.net>
Date: Sat, 18 Oct 2014 12:44:08 +0000

Double.toString() and Double.parseDouble(...) appear to be locale-unaware
and therefore safe for data reading and writing (no fear of commas as
decimal separators, etc.). The dangerous bits in PuffinPlot are 
String.format and Scanner, which default to the current locale if none
is specified explicitly. Need to go through these making sure a standard
locale (presumably "en") is set everywhere so that PP file formats are
not dependent on current locale. toString and parseDouble should be 
preferred where possible for reading and writing files: apart from avoiding
locale hassles, they provide maximum accuracy without extraneous digits
and with no headaches about "appropriate" SF/DP values in format specifiers.