Math functions in different cultures -
02-22-2006
, 11:07 AM
Hi:
I need to write some number formatting code that can work in different
countries. Since different cultures use different characters for group
and decimal separators, I am concerned how the Math functions will be
able to parse values typed in with different separator characters.
I want to allow my users to enter a "," for a decmial place if that is
what their culture does.
Do I need to first convert the comma to a "." for Math.round to
successfully parse a number? Or if that browser has been set up for
say, fr-FR, do I need the decimal character that the fr-FR culture
specifies?
Any idea how browsers handle the string to number context conversion in
different locales? I cannot find good information on this. |