I am really confused with a php function I have written. The function searches a string and replaces signs with their entities and the other way round. I know that the function works because it has been working for 4 months. However I am now constructing a new website and am using the same function. I know for certain there are no typing errors in the function and that it definately works. However when converting a '£' to £ it displays a �.
The confusing part is that I have tested the old website on my server to make sure it works and it does but this new website does not. Maybe I am missing some sort of line of html to help encode these signs. I don't know if this makes a difference but at the moment the content-type is set to:
This is what it is set on the old website so there should be no problem.
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Very grateful for any suggestions,
Thanks in Advance,
I resolved this by placing this code into the top of my page:
header('Content-Type: text/html; charset=ISO-8859-1');
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)