Hi all,
I'm usually a LAMP developer, but some .NET work has arrived on my plate and I'm a bit stumped.
If I run the following code:
<% poundsign = "£" %>
<% Response.Write poundsign %>
<% Response.Write "£" %>
… nothing is displayed. However, outside of the <% %> tags (ie in the HTML) £ displays correctly.
I have no trouble displaying the usual alphanumerics, it's just the £ sign that is proving problematic. The underlying file is in Windows 1252 encoding, and I need to serve it as such. If I save the file as UTF-8, I get mojibake instead of a £.
Does anybody have any idea what I can do to make this work, or any settings that might be preventing it from working (other than saving the file in a different format)? Thanks in advance.
EDIT: Sorry guys, I should have mentioned earlier, but £ won't help. Aside from the fact that my £s aren't appearing on the page, a major part of my problem is that I need to insert strings containing £ into a SQL server database, but if I form a SQL INSERT statement within the ASP, none of the £ signs end up appearing in the database. Inserting £ signs into the database from ASP isn't a problem when I save the .asp files as UTF-8 files, but I need everything to work in Windows 1252 encoding. Thanks again.