Our web site is going to have to be able to accept data entered in
form fields from users in different locales; we're looking at "English
(UK)" and "Spanish (Standard)" for starters.

For English users, '.' will be the decimal point character. If
Window's Regional and Language Options is to be believed, Spanish
users will enter ','.

I was starting to think that lsParseNumber() held the key. However, this:

<cfset setLocale = "Spanish (Standard)">
<cfset fNumber = lsParseNumber("1200,15")>
<cfset setLocale = "English (UK)">
<cfoutput>#fNumber#</cfoutput>

outputs "120015" and not (as I'd anticipated) "1200.15".

Does lsParseNumber() not work (Win CFMX 6.1) or does it work fine and
have I got the wrong end of the stick?

Thanks for any pointers.


-- 
Aidan Whitehall

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:244776
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to