Ionic 2 arabic json response


#1

hello
when i get json response which in arabic language i got rubbish text


#2

this only in ionic happen in browser is worked normally


#3

What does that mean?
How are you testing?
What are you doing to get this “arabic json” into your app?
What code is applied on the JSON content when inside the app?


#4

when i open the json response in broswer i got the text in arabic not rubbish

this code i got the json response in arabic in ionic
return this.http.get(‘url’).timeout(30000)
.map(res => res.json())


#5

I consider it quite impolite to answer 4 explicit questions with 1 answer and some unformatted code.


#6

sir my question is clear when i get JSON array wrote in arabic in ionic 2 i got rubbish text like image i upload

although i added a header in JSON request php file



header("Access-Control-Allow-Origin: *");
header('Content-Type: text/html; charset=utf8mb4');



#7

I asked you some clarifying questions that you don’t want to answer. Well then, good luck finding an answer.


#8

i solved the problem


#9

JSON has a specific set of characters that are allowed. Anything else you must encode (base64 is most typical).