I have a problem with the FormatNumber function in Classic ASP.
When this overload is used
FormatNumber(cdbl(aRecs(3, i)) , 0, 0, 0), the number appears fine e.g. 160 703
However, when this overload is used
FormatNumber(aRecs(3, i),0,false,false,true),”0″), the number appears with a special character as the thousand seperator e.g. 160Â 703
N/B: aRecs(3, i) refers to a values being retrieved from a recordset (from the database).
On the production server(Windows Server 2008) everything works fine, however, when i setup a dev environment (windows 7 as well as Windows server 2008), thats were i get this problem. I have tried setting a thousand seperator in my regional settings to no avail
Am i missing something. Also, this is a very old project and i cannot go and modify all occurances of calls to this function.
Add this line of code to the top of your page:-
This problem is usually a result of a mismatch between the response code page (in your case I’m guessing 65001) and the CharSet value in the content type header. Usually no CharSet value is delivered so the browsers guesses, typically using the current user locale to determine the codepage.