Table Encoding Vs File Encoding

Good Afternoon,

I’m trying to make a search in the database in order to see if a record already exists in the database with the next code snippet, if it this simply updates…

$model = $args[0]::model()->findByAttributes(array($fields[0] => $cols[0]));

The problem is that my database collation is ISO-8859-1 and the file being imported is UTF-8…is there a way to overcome this in the code above…

Code to import the UTF-8 csv file

 $file = Yii::app()->request->baseUrl . "/import/" . $args[0] . ".csv";

Best Regards,

Rui Oliveira

Have you set ‘charset’ param in db section of config file?