tingleweb
asked on
formatcurrency showing invalid character symbol instead of pound sign
i've got this code:
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ------
display = display + "<div id=""productsProductOuterC ontainer"" >"
display = display + "<div id=""productsProductContai ner"">"
display = display + "<div class=""productImageContai ner""><a href=""product.asp?Product ID=" + ProductID + "&ProductName=" + ProductName + "&Department=" + dept + "&menswomens=" + category + """><img src=""images/md/" + ProductImage + ".jpg"" class=""productimages"" alt=""" + ProductName + """/></a></div>"
display = display + "<p>" + ProductName + "<br />" + formatcurrency(ProductPric errp) + "</p>"
display = display + "<a href=""product.asp?Product ID=" + ProductID + "&ProductName=" + ProductName + "&Department=" + dept + "&menswomens=" + category + """><img src=""images/" + session("menswomens") + "bt_view.gif"" alt=""View"" /></a>"
display = display + "</div> <!-- end of productsproductcontainer -->"
display = display + "</div>"
response.write(display)
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ------
but instead of formatcurrency(ProductPric errp) showing £ before the price, its showing an invalid character symbol (square). Any ideas please?
--------------------------
display = display + "<div id=""productsProductOuterC
display = display + "<div id=""productsProductContai
display = display + "<div class=""productImageContai
display = display + "<p>" + ProductName + "<br />" + formatcurrency(ProductPric
display = display + "<a href=""product.asp?Product
display = display + "</div> <!-- end of productsproductcontainer -->"
display = display + "</div>"
response.write(display)
--------------------------
but instead of formatcurrency(ProductPric
you will probably have to change the codepage of the page in question to be uk. I know the server may be located in europe, however it may have been configured to be us, or some other country
another thing that may do it, the DTD you use
Besides the above look at the encoding for the page. This can be done with an html meta tag but is even better from the server. In ASP it would be done with ...
Response.AddHeader "Content-type", "text/html; charset=utf-8"
You could use a different encoding but utf-8 is one that should support that symbol.
Let me know if you have a question or need more info.
bol
Response.AddHeader "Content-type", "text/html; charset=utf-8"
You could use a different encoding but utf-8 is one that should support that symbol.
Let me know if you have a question or need more info.
bol
One other thought and maybe the simplest solution if it is an encoding issue. Use HTMLEncode.
response.write(Server.HTML Encode((di splay))
bol
response.write(Server.HTML
bol
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Closed, 500 points refunded.
modus_operandi
Community Support Moderator
modus_operandi
Community Support Moderator