Basically, bilanguage sites, where one of the languages is English do not have problems with encoding, but if you experience such, I would highly advise you to put the Non-English language as default. This will allow you to run your Joomla! Backend on that language and in most of the cases, this solves 99% of the encoding problems and database missmatches in collations.
If you still experience problems with the encoding of the other language, this is caused almost in all of the cases by the apache (or other server) default encoding, that is preset. On some servers, this encoding is sent as a header in the cookie and causes issues. In such case, there is easy and fast solution:
- Open the file globals.php and at the end of it, right after the last
Code: Select all
}
Code: Select all
?>
Code: Select all
header("Content-Type: text/html; charset=ENCODING");
Code: Select all
header("Content-Type: text/html; charset=windows-1251");
How to do it?
Please do these actions, before installing Joomla!
1. Create your database manually and go to operations, there set a collation of the database as utf8_general_ci (Screenshots are available at http://www.joomfish.net).
2. Open the file includes/database.php go to line 102 and change the following code from:
Code: Select all
// @mysql_query("SET NAMES 'utf8'", $this->_resource);
Code: Select all
@mysql_query("SET NAMES 'utf8'", $this->_resource);
3. Open the file globals.php and at the end of it, right after the last
Code: Select all
}
Code: Select all
?>
Code: Select all
header("Content-Type: text/html; charset=UTF-8");
Code: Select all
DEFINE('_ISO','charset=iso-8859-1');
Code: Select all
DEFINE('_ISO','charset=UTF-8');
6. When you install new languages, please be sure that those are saved as UTF-8 without BOM. Very cool editors that allow this are Crimson Editor and Notepad++
That's it. Now everything is expected to work like a charm. More information about how Joomla! 1.0.x handles UTF-8 is available in the following post:
http://forum.joomla.org/index.php/topic,55065.0.html
You can also consider to use the hack that allows generation of PDF documents in UTF and works for probably any language:
http://forum.joomla.org/index.php/topic,110713.0.html
Author note:
Older versions of MySQL doesn't supports databases with collation utf8_general_ci, then you most probably would not be able to create a fully compatible UTF-8 site.
Source: http://www.joomfish.net/content/view/39 ... g,english/