Character encoding issue in PHP and MySQL -


When I run a query directly using phpMyAdmin, then it - (long dash, normal Not - ), but when I run this query with my PHP code, they go to รข € ".

If you encode It is % E2% 80% 93 (in javascript). % E2 becomes one , % 80 becomes and % 93 becomes ". I understand that when I run a query in phpMyAdmin, it saves this data as - , but when I run the query in my PHP code, it does not work in the way I want it .

Which character encoding do you use in your table? After connecting to DB in PHP try to run it:

  mysql_query ('SET NAMES utf8'); // if you use utf-8  

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -