PHP Mysql Json and Arabic

I am inserting arabic data into mysql using php and html form. After inserting the data into the mysql table, the data looks like this: "... Ø ± ØØ¨Ø§ ا" "عا" "..." However, when I select this data on my web page, it shows the perfect Arabic sentence . However, when I expose this data to the json_encode function and try to read this data from android, the android shows "... Ø ± ØØ¨Ø§ ا" "عا" "... after parsing json. Is there any way to present this data in android is significant.

Update:

http-equiv="Content-Type" content="text/html; charset=utf-8" 

I also use this meta tag on my display page. Without this meta tag, my browser also displays data similar to this ... Ø ± ØØ¨Ø§ ا "عا" "Ù ...

thanks

0
source share
2 answers

How do you view it through MySQL? Putty? Make sure your terminal encoding is set to UTF-8, not ASCII.

EDIT: after I tried this, I had to set my Putty encoding to Win1256 so that the characters displayed correctly on the console.

Putty Settings:

enter image description here

+1
source

Make sure you use the same character encoding on all platforms. Ideally use UTF-8.

0
source

All Articles