Reputation: 1287
I'm having some trouble with my page. I have moved my site from a host provider to another one, and now i'm having some problems with non-latin characters, for text that comes from db query and for text that is in html/php file. For text that comes from db someone suggested me to apply this after db connection:
mysql_query("SET CHARACTER SET utf8");
mysql_query("SET NAMES utf8");
and it did the trick, but, now i'm having the same problem for texts that comes from html/php files: instead of ë or ç appears � I'm sure that should be e trick someone on the server or somewhere else on the configuration. Hope that you can help me.
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
i'm using at the header of my file.
Upvotes: 1
Views: 309
Reputation: 114
Maybe there was a problem while transfering the files.
If you are familiar with Linux, try to fix the broken files on your server with recode (excerpt: "The Recode library converts files between character sets and usages.")
Upvotes: 0
Reputation: 4901
Is the collation of your database where the data is stored in utf8_general_ci?
Upvotes: 1
Reputation: 2407
You must have this line in your <head>
section:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Upvotes: 2