- return Double.parseDouble(v);
- } catch (NumberFormatException e) {
- throw new ParseException("error parsing double " + v, 0);
+ return nf_locale.parse(str.trim()).doubleValue();
+ } catch (ParseException pe) {
+ throw new ParseException("error parsing double " + str, 0);
+ }
+ }
+
+ public static String format_double_locale(double number) {
+ return nf_locale.format(number);
+ }
+
+ public static double parse_double_net(String str) throws ParseException {
+ try {
+ String t = str.trim();
+// System.out.printf("Parse string \"%s\" trim \"%s\"\n", str, t);
+ return nf_net.parse(t).doubleValue();
+ } catch (ParseException pe) {
+ throw new ParseException("error parsing double " + str, 0);