Hi Guys
I'm trying to establish if non-English browsers have a different implementation of parseFloat(). For example, if I enter 1,30 into a French installation of IE 5 will this be parsed as one dollar thirty cents or one dollar?
I've changed the regional settings of my Windows 2k installation and changed the language settings in IE itself so that fr_FR is at the top of the list but the return of parseFloat() continues to be what I'd expect in an English environment, (i.e. one dollar for 1,30).
Does this mean that I need to parse the String 1,30 and replace the ',' with a '.' before passing it to parseFloat()?
Perhaps somebody with a non-English European installation of IE/Windows could try the experiment for me, (just in case this is something that is set at installation). Could you try running this and tell me if the result is 3 or 3.3?
<html>
<head>
<script>
<!--
function testParse(){
var a = '1,3';
alert(parseFloat(a)+2);
}
-->
</head>
<body>
<input type=button value='Click Me' onclick='testParse();'>
</body>
I realise that there is an internationalization forum on this site but there is virtually no activity there which is why I'm posting this question here.
Thanks in advance
J
I'm trying to establish if non-English browsers have a different implementation of parseFloat(). For example, if I enter 1,30 into a French installation of IE 5 will this be parsed as one dollar thirty cents or one dollar?
I've changed the regional settings of my Windows 2k installation and changed the language settings in IE itself so that fr_FR is at the top of the list but the return of parseFloat() continues to be what I'd expect in an English environment, (i.e. one dollar for 1,30).
Does this mean that I need to parse the String 1,30 and replace the ',' with a '.' before passing it to parseFloat()?
Perhaps somebody with a non-English European installation of IE/Windows could try the experiment for me, (just in case this is something that is set at installation). Could you try running this and tell me if the result is 3 or 3.3?
<html>
<head>
<script>
<!--
function testParse(){
var a = '1,3';
alert(parseFloat(a)+2);
}
-->
</head>
<body>
<input type=button value='Click Me' onclick='testParse();'>
</body>
I realise that there is an internationalization forum on this site but there is virtually no activity there which is why I'm posting this question here.
Thanks in advance
J