mercredi 15 février 2017

Mysql don't store "€"

I am working on a application where I need to store/show data containing many special characters. I have set database collation utf8. I have set collation of table utf8 and character set as utf8_uni_code. It is storing all special characters like é, â. But whenever a character , comes it isn't stored as it is. Like whenever there is a word “attributed†it becomes âattributedâ. I am currently using Laravel 5.2 (PHP) .

What I have tried so far I have set following in my code

  iconv_set_encoding('internal_encoding', 'UTF-8');
  mb_internal_encoding('UTF-8');

I have also tried

$value = array_map("utf8_encode", $array);

But this special character isn't getting stored as it is. Will any one let me know what should I do to get this special character saved as it is.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2l7uCQh
via IFTTT

Aucun commentaire:

Enregistrer un commentaire