0

I have a problem in my application with accent. It is an application that works with the upload of files to a MySQL database from PHP and Slim Microframework. The problem occurs in that I am not shown the accent, even though everything is encoded in UTF-8 in the database. I have been reading on the internet and I have seen something that has helped me in part, but after uploading the files of the problems, and not showing the accents. I give you a piece of code to see if you can help me. It is in the PDO connection:

$this->pdo = new PDO('mysql:host=localhost;dbname=myDB','user','password',array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES  \'UTF8\''));

regards

Mohicano
  • 1
  • 1
  • For reference: [**UTF-8 all the way through**](https://stackoverflow.com/questions/279170/utf-8-all-the-way-through). – FirstOne Jun 11 '17 at 14:10
  • Just a note: if you already saved the values without them, they will not magically appear. – FirstOne Jun 11 '17 at 14:11
  • It seems that I explained it so bad, sorry. If I have not insert the columns without accents, I would not have those problems. Any other idea? – Mohicano Jun 11 '17 at 17:09

0 Answers0