androidjsoncharacter-encodingspecial-charactersarabic

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?


Solution

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