I am using an xmlhttprequest to display one html document inside the div tag of another html document.
When the target page is displayed, it replaces certain characters with question marks. I discovered that if I open the html file in Notepad and save it in UTF-8 format, the page loads properly, without the question marks. I'm looking for a way to write a script in PHP to open several hundred html documents of this type and save them as utf-8 encoded files, in the way tha Notepad stores them.
I have attempted to do this in PHP by:
1. using header("Content-type: text/html; charset=utf-8"); at the top of my PHP file,
2. opening the file, inserting <meta http-equiv='Content-Type' content='text/html; charset=utf-8'> right after the <head> tag, and
3. using utf8_encode to save the file contents.
This does get rid of the question marks that were replacing certain %A0 (space) chars but, single quote marks still come out as question marks (e.g., don?t ).