Hi there,

I'm building a multilanguage CMS based Web site using PHP 5- MySQL and I'm facing problems with languages.

From what I've been reading I must use charset UTF-8 (as Wikipedia uses this I guess this is realy the right choice).

Now, I must also know how to store different languages in a MySQL table - possible? How do I do it?

So far I haven't succeeded storing anything different character there, not even a simple รง.

Please, any hints? I'm getting desperate here..
Thank you!

8 Years
Discussion Span
Last Post by marcosjp

Well, 8 hours ago I posted this desperately in need of an answer. Yes, it's Sunday, but one's got to work hard if he wants to get somewhere faster... No one replied... but... I've found the solution...

Putting in simple terms:
1. Your forms must be coded in UTF-8
2. The pages where you want to display multilanguage text too.
This means you MUST use this:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

3. Your MySQL table MUST be coded as utf8_general_ci

Surprisingly, this is not enough and this is what was driving me nuts...

4. So, to fix this, you must use this before issuing the sql commands:

$defineutf = "SET NAMES 'utf8";
$utf = mysql_query($defineutf);

This is the article that saved my day:

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.