Skip navigation links

MySQL Forums :: PHP :: Encoding problem...


Advanced Search

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.


[SOME MORE DETAILS...]

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:

/usr/bin/mysql -u ${REMOTE_DB_USER} -p${REMOTE_DB_PASS} ${REMOTE_DB_DATABASE} < ${SQL_FILE};

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,

Chris

Options: ReplyQuote


Subject Written By Posted
Encoding problem... Teddy Ashton 07/30/2010 07:04AM
Re: Encoding problem... Guelphdad Lake 07/30/2010 07:43AM
Re: Encoding problem... Rick James 08/01/2010 02:33PM
Re: Encoding problem... Ted Ashton 08/04/2010 02:53PM
Re: Encoding problem... Ted Ashton 08/04/2010 02:59PM
Re: Encoding problem... Teddy Ashton 08/02/2010 11:52AM
Re: Encoding problem... Ted Ashton 08/02/2010 06:10PM
Re: Encoding problem... Rick James 08/02/2010 08:42PM
Re: Encoding problem... Ted Ashton 08/05/2010 12:30AM
Re: Encoding problem... Ted Ashton 08/05/2010 12:33AM
Re: Encoding problem... Ted Ashton 08/05/2010 12:35AM
Re: Encoding problem... Ted Ashton 08/05/2010 12:37AM
Re: Encoding problem... Rick James 08/05/2010 08:43AM
Re: Encoding problem... Ted Ashton 08/06/2010 02:17PM
Re: Encoding problem... Rick James 08/06/2010 11:01PM
Re: Encoding problem... Ted Ashton 08/08/2010 04:01PM
Re: Encoding problem... Rick James 08/08/2010 06:16PM
Re: Encoding problem... Ted Ashton 08/05/2010 12:40AM
Re: Encoding problem... onokung onokung 09/01/2010 12:53PM
Re: Encoding problem... Rick James 09/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.