I'm having trouble in my Zend Framework App displaying the correct characters.
EG/
rue de l'Odéon
Displays as:
rue de l'Od�on
When displaying information through a webservice and also by displaying it through the applications view.
I have tryed the following things:
1) Set the character encoding in the view.
$view->setEncoding('UTF-8');
2) Ensured that col / table encoding on the underlying database is UTF8 (mysql db)
ALTER TABLE tablename CONVERT TO CHARACTER SET utf8;
3) Passed the charset varaible to the Zend_Db::Factory method when creating my Db connection. This is the config section of the object I obtained through the registry.
[_config:protected] => Array
(
[host] => localhost
[username] => root
[password] => ---------------
[dbname] => db_staging
[charset] => utf8
[options] => Array
(
[caseFolding] => 0
[autoQuoteIdentifiers] => 1
)
Best Answer
A few questions below. I know some of these sound completely silly, but when I get stuck like this I automatically assume it's something so obvious I will spend days kicking myself! :) First of all, I assume you are using ZF 1.8 given the charset option above? If not (or even if the list below doesn't solve it) switch back to the older method to see if that solves anything first.
My UTF-8 crisis checklist ;). Let me know if anything listed helps. I think it covers most of the items I can think of.