mysql encoding problem

Posted by Syom on Stack Overflow See other posts from Stack Overflow or by Syom
Published on 2010-03-22T20:53:23Z Indexed on 2010/03/22 21:11 UTC
Read the original article Hit count: 667

Filed under:
|
|

i have a proble, when insert something in foreign language into database. i have set the collation of database to utf8_general_ci(try utf8_unicod_ci too). but when i insert some text into table, it was saved like this

Õ€Õ¡ÕµÕ¥Ö€Õ¥Õ¶ Ô±Õ¶Õ¸Ö‚Õ¶

but when i read from database, text shows in correct form. it looks like that only in database.

i have set encoding in my html document to charset=UTF-8

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

and i set

mysql_query("SET NAMES UTF-8");
mysql_query("SET CHARACTER SET UTF-8");

when conecting to database. so i think that i' ve done everything, but it still save in that anknown format. could you help me. thanks in advance

© Stack Overflow or respective owner

Related posts about mysql

Related posts about php