i am getting data in Urdu language from feeds and when i store it in MySql it will store question marks in the database. what should i do? I already set collation to utf8_general_ci . here is the code below: $result = Domain::SpUrduNewsInsert($Url,$Title_utf8_string, $summary_utf8_string, $DateObj,$content_hash , $news_image );
Asked
Active
Viewed 190 times
0
-
Why collation? What encoding (charset) did you set for the database? – David Ferenczy Rogožan May 10 '16 at 14:37
-
Possible duplicate of [how to deal with accents and strange characters in a database?](http://stackoverflow.com/questions/33219970/how-to-deal-with-accents-and-strange-characters-in-a-database) – David Ferenczy Rogožan May 10 '16 at 14:39
-
2Set the connection charset to `utf8`. Have your tables use `utf8`. Collation is for **ordering** by alphabet characters, it has **nothing** to do with actual chars being saved. – Mjh May 10 '16 at 14:39
-
Yep, I agree with Mjh. I would just suggest setting the encoding for the whole database rather than for each table (if you don't need to have different encoding for different tables). See my linked answer for details. – David Ferenczy Rogožan May 10 '16 at 14:41
-
how i change mysql charset in phpmyadmin? can anyone help me ? – Bilal Hussain May 10 '16 at 15:05
-
by default mysql database is in utf8 charset so why it stores question marks i tried every thing can anyone plz help? – Bilal Hussain May 10 '16 at 15:10
-
1Possible duplicate of [UTF-8 all the way through](http://stackoverflow.com/questions/279170/utf-8-all-the-way-through) – miken32 May 10 '16 at 17:51