Csv Export And Utf8 Charset

I recently installed exportablegridbehavior to export filtered cgridview to csv. The csv file is correctly generated, except for the character encoding. The data are correctly printed on the screen, and my main config file (main.php under config)contain this line “‘charset’ => ‘utf8’,” under db=>array. If I remove that line, what appears on screen is messy, but the csv file is then correct. I digged into the forum to find a solution and wanted to asked directly in the extension page, but I’m a newbie and I can’t post there (this is my first post in the forum).

BTW, I previously installed eexcelview, which worked fine too, with no encoding problem, but I had problem with large export, something that exportablegridbehavior can manage in a better way.

thanks!

write in config/main.php




'charset' => 'utf8_encode',



if it is work reffer below link it may help you.

utf8_encode

Hello Hiral,

I tried and it didn’t worked, but I’ll investigate a little later tonight…

thanks!