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!

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:
http://www.shawnolson.net/a/946/unicode-data-with-php-5-and-mysql-41.html

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.