I suggest you to add afterFind() in your AR model that represents your database table and do all encoding conversion there:
// this should be placed inside you AR class
protected afterFind()
{
foreach($this->attributes as $k => $attribute)
{
$this->$k = iconv("ISO-8859-2", "UTF-8", $text);
}
parent::afterFind();
}
At least for MySQL if you have table in another charset and you have connection in UTF8 then MySQL will do the encoding and decoding for you automatically.
have this in your db section config:
'charset' => 'utf8',
if this does not work for you then the data in your tables is not actually ISO-8859-2 but encoding mess that is most likely caused by the another programs not setting the charset (latin1 is used for default)
If it’s Mysql database then you’ve - log in hosting account details
Type this command in command line mysql -u username -p
at the place of username mention your username
Enter correct password
To display current character set type the command mysql>prompt
SELECT default_character_set_name FROM information_schema.SCHEMATA S WHERE schema_name = "DBNAME";
To display current character encoding set for a particular database, type the command mysql>prompt
SELECT CCSA.character_set_name FROM information_schema.TABLES T,information_schema.COLLATION_CHARACTER_SET_APPLICABILITY CCSA WHERE CCSA.collation_name = T.table_collation AND T.table_schema = "DBNAME" AND T.table_name = "TABLENAME";