Forum Moderators: coopster
I am reading an XML file using PHP's fopen method like following and displaying on my website:
$fh = fopen($myFile, 'r');
When I run it locally on Apache on Windows then it displays fine but after uploading it on another Windows server running IIS it is displaying some weird characters like:
’ is being displayed instead of ’
I tried using different encoding types like:
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
and
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
but result is the same. What could be the problem?
But the question is why is it showing Western European (ISO) by default when I have define UTF-8 in my web page?
Finding 1
---------
If I view the source code of that page, copy source, then create a new html file on my PC, then paste that code and then double click on that file to view then this time encoding is set to UTF-8 but instead of those weird characters it is now showing square boxes! If I select Western European (ISO) then it displays fine!
Finding 2
---------
If I save the page on my PC from File --> Save As in browser, then double click on it to open then this time it is set to Western European (ISO) with those weird characters displaying. And when I select UTF-8 then it shows boxes instead of this  character. The other character which is ’ displays fine as ’