Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

arabic letters appears as symbols in json

Hello to all,

I want to ask processing json response.

why when I assigned backend response to JSON variable, Arabic characters appears as symbols - set of question marks - ?

I need to customize it before it displayed to the end user.

The backend response:

{
   "totalSearchResults":"1",
   "Info":[
      {
         "ID":"123456789",
         "FirstName":"خالد",
         "FatherName":"فيصل",
         "FamilyName":"الشهري",
         "Address":"حي القادسية"
      }
   ]
}

I want the modified response to be like this:

{   
  "code":200,
  "name":"Successful Response",
  "data":[
   {
     "totalSearchResults":"1",
     "Info":[
      { 
         "ID":"123456789",
         "FirstName":"خالد",
         "FatherName":"فيصل",
         "FamilyName":"الشهري",
         "Address":"حي القادسية"
      }
    ]
   }
  ]
}

But in my attempts, the response appears like this: (notice the Arabic letters are not correct)

{   
  "code":200,
  "name":"Successful Response",
  "data":[
   {
     "totalSearchResults":"1",
     "Info":[
      { 
         "ID":"123456789",
         "FirstName":"ط®ط§ظ„ط¯",
         "FatherName":"ط¹ط¨ط¯ط§ظ„ظ„ظ‡",
         "FamilyName":"ط§ظ„ط´ظ‡ط±ظٹ",
         "Address":"ط­ظٹ ط§ظ„ظ‚ط§ط¯ط³ظٹط©"
      }
    ]
   }
  ]
}

Can anyone help?

thank you.

0 9 4,150
9 REPLIES 9
Top Solution Authors