Invalid multibyte sequence in argument

Hi,

I am doing my first project with Yii (actually, I’m not too experienced with PHP either).

I have created some models and crud scaffolding from an existing database using yiic shell. The database is a MySQL database with character set utf8 and has Danish characters in it.

When I try to view the data listings in the browser, the tables without Danish characters work OK. But with the tables that contains Danish characters I get this PHP error: htmlspecialchars(): Invalid multibyte sequence in argument.

What am I doing wrong?

Found the problem myself :)

I had forgotten ‘charset’ => ‘utf8’ in main.php.