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_unicode_ci
. 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.