Problem with inserting greek characters in database

Hi

I have problem when inserting greek characters in mysql database

After the insert, the greek characters look like this:&#;&#;&#;&#; where the _ is a number. (I can’t paste it here, because on preview the greek characters are displayed right.)

MySQL version is 5.0.77
My database have utf8_unicode_ci collation. All fields in the table have same collation utf_8_unicode_ci collation.

Php document where the form is submitted have the following encoding

<meta http-equiv=“Content-Type” content=“text/html; charset=*UTF-8” />
I also try with
<meta http-equiv=“Content-Type” content=“text/html; charset= ISO-8859-7” />

However, the result remain the same. In phpmyadmin, the characters are displayed as:&#;&#;&#;&#;

I would like to know what encoding should I use in order to get Greek characters in mySql database. Anyone have any idea?

Regards, Zoreli

How are you inputting the characters? In a rich text editor?

Try inspecting the characters before you send them to the database. Perhaps they’ve been converted by the browser/ webserver.

Hi Immerse

Here is the query printed before the insert:INSERT INTO customers2 VALUES (NULL,‘ασδφα’,‘λκξλ’,‘’,‘’,‘’,‘’,‘’,‘’,‘’,‘’,‘’,‘’,‘Yes’);

Any other suggestion?

Regards, Zoreli

Have you tried using the query “set names utf8” before you start inserting data ?

Hi

Arkh, you point me to the right direction and many thanks for that.

However, from some strange reason the

mysql_query(“SET NAMES utf8”); didn’t worked.

Accidentally, I place this code

mysql_query(“SET NAMES ‘utf8’”); and that worked. Note the single quotes around the word utf8.

Sorry for bumping this thread, but it may save great amount of time to someone who may have the same problem. I spent too much time on this, hopefully other people won’t need to do so, here is the solution.