String comparison failure
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2013
03:16 PM
12-07-2013
03:16 PM
String comparison failure
Why is JScript is evaluating "15 000,00" == "15 000,00" as false?
Solved! Go to Solution.
2 REPLIES 2
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2013
05:37 AM
12-08-2013
05:37 AM
Hi S S, try using the === operator, you may be experiencing type coercion issues around using the == operator as detailed here http://www.c-point.com/javascript_tutorial/jsgrpComparison.htm
Regards
Phil Baird
Regards
Phil Baird
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2013
06:20 AM
12-08-2013
06:20 AM
Actually it was a hidden character issue. Replacing the space ' '(Unicode value:160) with space ' '(Unicode value:32) resolved the comparison failure.
