0

My job is to migrate our current website to production. (I'm not the developer of the zend app). It's a french app, so we use a lot of french characters like "é"

Our database collapse is utf8_bin (all).

If I use a form for uploading data (for example the string "mémé"), if I look in phpmyadmin, the data is stored as mémé and the accents are correctly displayed in the app view (mémé) so no problem.

But now, if I insert data directly with phpmyadmin (mémé), data is stored as "mémé", but in my app view, the display is: m�m�.

It's a problem because we upload many data from excel files, using a python script with pymysql, and we have a lot of �.

How can I fix that ? Is it in zend configuration, because everything seems ok in my database configuration.

Thanks

  • When you upload data from excel file, write a script to add data in database using python/php (as you tag php). Run the script, so that data will be added into system with "?" but it will reflect properly in your web page. – Dipanwita Kundu Apr 13 '17 at 05:05
  • Thank you, the solution was just `$db->query("SET NAMES 'utf8'");` –  Apr 13 '17 at 19:56
  • Mojibake and black diamonds -- both are discussed in http://stackoverflow.com/questions/38363566/trouble-with-utf8-characters-what-i-see-is-not-what-i-stored – Rick James Apr 14 '17 at 01:09

0 Answers0