Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 787
  • Last Modified:

FormatCurrency Issue

Hi all

When I use FormatCurrency(1.00) in ASP I get £1.00.  Anybody got any clues?
<% @ LANGUAGE="VBScript" %>
<% 
Dim strCurrencyTest
	
	Session.LCID = 2057
	strCurrencyTest = FormatCurrency(1.00)
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head> 
	<title>Currency Test</title>
</head> 
<body>
	<form>
	<table>
		<tr>
			<td><%=strCurrencyTest%></td>
		</tr>
	</table>
	</form>
</body>
</html

Open in new window

0
OxonDev
Asked:
OxonDev
  • 3
  • 2
  • 2
  • +2
1 Solution
 
neeraj523Commented:
can you check the output using

Session.LCID = 1033


0
 
Deepika_RastogiCommented:
You can use the VBScript SetLocale function in conjunction with FormatCurrency to change the currency symbol displayed.

SetLocale(LCID)

You can use the Decimal, Hex, or Short String value for the LCID (Locale ID), for example these will all set the Locale to English - United States:

SetLocale("en-us")   :    SetLocale(0x0409 )    :    SetLocale(2057)

Also visit
http://msdn.microsoft.com/en-us/library/5xf99h19(VS.85).aspx
for further assistance
http://msdn.microsoft.com/en-us/library/0h88fahh(VS.85).aspx
to view the locale id chart


0
 
Deepika_RastogiCommented:
Also

If you can run a global.asa file on your server then place the following into your global.asa file to change the locale settings throughout your site: -
   
 'When a session starts on the server the following code will be run
Sub Session_OnStart

     'Set the server locale
     Session.LCID = 1033
End Sub  
   

If you can not use a global.asa file, place following into the top of each ASP page you wish to change the locale settings on: -

   
 <%
'Set the server locale
Session.LCID = 1033%>
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
bluefezteamCommented:
That is invalid html markup for £, what you need is &pound;
0
 
bluefezteamCommented:
just use this

<%
response.write("&pound;" & formatNumber("2",2))
%>
0
 
Abiel de GrootCommented:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>

Sets the character encoding UFT8

Regards

A.
0
 
Abiel de GrootCommented:
Also...

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

A.
0
 
OxonDevAuthor Commented:
Thanks all for your efforts but bluefezteam was the only one to find a work around for the problem so...  It would still be nice to know what causes it in the first place but I settle for a fix!
0
 
bluefezteamCommented:
glad to be of help

cheers
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 3
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now