I have a backup server that automatically backs up my live site, both files and database.
On the live site, the text looks fine, but when you view the mirrored version of it, it displays '?' within some of the text. This text is stored within the news database table.
Here is a screen shot of it being on the live server and of it on the mirrored server.
What could happen within the process of backing it up to the mirrored server? alt text http://i34.tinypic.com/2mpbfo6.jpg
I got here looking for a solution for JavaScript displayed in the browser and although not directly related with a database...
In my case I copied and pasted some text I found on the internet into a JavaScript file and saved it with Windows Notepad.
When the page that uses that JavaScript file output the strings there were question marks (like the ones shown in the question) instead of the special characters like accented letters, etc.
I opened the file using
Notepad++
. Right after opening the file I saw that the character encoding was set asANSI
as you can see (mouse cursor on footer) in the following screenshot:To solve the issue, click the
Encoding
menu inNotepad++
and selectEncode in UTF-8
. You should be good to go. :)Edit your Apache configuration file on the "mirror" server (the server with the problem), and comment-out the following line:
Then restart Apache:
The problem is that the "AddDefaultCharset UTF-8" line overrides the Content-Type specified in the .html files; e.g.:
The most common symptom is that character codes above 127 display as black diamonds with question marks on them (in Chrome, Safari or Firefox), or as little boxes (in IE and Opera). HTML files generated by Microsoft Word usually have many such characters, the most common one being character code 160 = 0xA0, which is equivalent to " " in the Windows-1252 encoding, and is often found between span tags, like this: