Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Arabic Json shows scrambled data

when I am parsing an Arabic Json I am getting characters like this áãÍÉ ãä ÇáÓíÑÉ These are latin unicode characters. The problem is that the database collation used is Latin 1. This data is converted to UTF-8. I am decoding this JSON using UTF-8. Is there any way to convert it into Arabic? As database collation cannot be altered. I want to know whether it is possible to convert the data to Arabic before displaying in the textview?

like image 211
Pratheesh Avatar asked May 01 '26 12:05

Pratheesh


1 Answers

Solved the issue by converting the data from database to UTF8. The data in database was in Latin 1 format. First it is converted to UTF8 using PHP. And this converted data is used for JSON formation. And in receiving side (android app) its decoded using UTF8. And then it worked perfectly for me.

like image 76
Pratheesh Avatar answered May 03 '26 00:05

Pratheesh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!