Q:

java, convert string to double for any locale

I know that there is already a similar question about this, but this one is a bit different. 
Say we have a string, and we know it can be converted to a double, but we know nothing about the locale of it.  Maybe its locale is English (with dot as separator) or French (with comma as separator), or something else.
So, how do I convert it to the right double value?

A:

If you want to parse a number from the "users" (default) locale, then maybe this could help you:
double number = java.text.NumberFormat.getInstance().parse(stringNumber).doubleValue();

