Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I18N of JS floats

Status
Not open for further replies.

jm99

Programmer
Jun 14, 2001
27
0
0
GB
Hi Guys

Is it the case that parseFloat will ALWAYS successfully parse a float that is formatted with the user's local decimal indicator. E.g. A German browser will correctly parse one dollar seventeen cents formatted as 1,17?

Thanks in advance
 
Thanks jared

Could you just tell me what your locale is, (what regional settings are in place)

Cheers
 
I'm in South Florida, but I'm not sure that JS is locale-sensitive in this case. Please let me know if it is... jared@eae.net -
 
Hi jared

The particular problem that I'm trying to address wouldn't affect you as I guess that you've got the machine set to a US locale. The issue that I have is that not all locales use a '.' and I'm trying to establish if the js engine in the browser is smart enough to swap the separator based on the locale. I guess that I'll just have to swap the settings on my machine but I didn't really want to have to validate the behaviour for every country that the app needs to work in, oh well ;->

J
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top