MySQL Forums
Forum List  »  PHP

Encoding problem...
Posted by: Teddy Ashton
Date: July 30, 2010 07:04AM

Dear all,

I have a website running on my local machine that contains pages in several different languages -- English, German, Turkish Russian... When I view this site, all the characters are displayed as I would expect them, however, when I upload the site to the live site the 'special characters' aren't preserved.


Data was entered into the database from a plain text file.

On the local machine I have ensured the database default character-set is utf8, and have manually checked the relevant tables and columns are of character-set utf8.

I upload my website files via rysync, and the database via a mysqldump:

/usr/local/mysql/bin/mysqldump -u"${LOCAL_DB_USER}" -p"${LOCAL_DB_PASS}" "${LOCAL_DB_DATABASE}" | gzip > "${LOCAL_DB_GZIP}"

and upload the resulting file via ssh to the live server, where I import it (after gunzip) to the live database with:


I have checked on the remote server that the database and relevant tables and columns are encoded with a character-set utf8.

When I view the remote website the 'special characters' have degraded. Some examples are:

ş => ? (should be a crylic 's' with a squiggle underneath it)
ç => ? in a diamond (should be a crylic 'c' with a squiggle underneath it)
Most russian character show as '?'.

When I view the database on the remote server via phpMyAdmin there is no problem, as in the characters display as they should!

For information the local machine where everything works is running:

OS: OS X 10.6.4
MySQL: 5.1.38-log
Php: 5.3.1

and the remote server where things don't work:

OS: Linux 2.6.18
MySQL: 5.0.91-community-log
Php: 5.2.13

The remote server is on a shared hosting account, so I only have limited access to configure things.

My gut feeling is that this is a server configuration issue, as the database/tables/columns have preserved their utf8 character-set status

Any help and pointers in the right direction would be very much appreciated.

Many thanks,


Options: ReplyQuote

Written By
Encoding problem...
July 30, 2010 07:04AM
July 30, 2010 07:43AM
August 01, 2010 02:33PM
August 04, 2010 02:53PM
August 04, 2010 02:59PM
August 02, 2010 11:52AM
August 02, 2010 06:10PM
August 02, 2010 08:42PM
August 05, 2010 12:30AM
August 05, 2010 12:33AM
August 05, 2010 12:35AM
August 05, 2010 12:37AM
August 05, 2010 08:43AM
August 06, 2010 02:17PM
August 06, 2010 11:01PM
August 08, 2010 04:01PM
August 08, 2010 06:16PM
August 05, 2010 12:40AM
September 01, 2010 12:53PM
September 01, 2010 10:50PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.