How To Put In Json Object Non-english Letters?
I am android developer. And I get my data from MySQL database via PHP code:
Solution 1:
$someJSON = json_encode($someArray, JSON_UNESCAPED_UNICODE);
is fine. The problem is elsewhere. See "question mark" in here
The most likely cause/fix:
The column in the database table is not CHARACTER SET utf8
(or utf8mb4). Fix this. (Verify with SHOW CREATE TABLE
.)
Note: the JSON really has question marks; the data cannot be recovered from it. You must go back and rebuild the JSON.
Post a Comment for "How To Put In Json Object Non-english Letters?"