Html – Question mark characters display within text. Why is this


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 screenshot 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

The live server is Solaris, and the mirrored server is Linux Red Hat Linux 5.

Best Solution

The following articles will be useful:

10.3 Specifying Character Sets and Collations

10.4 Connection Character Sets and Collations

After you connect to the database, issue the following command:

SET NAMES 'utf8';

Ensure that your web page also uses the UTF-8 encoding:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

PHP also offers several functions that will be useful for conversions:

Related Question