Page 1 of 1

Webservice call from PHP using JSON

Posted: Tue Feb 14, 2012 6:19 am
by milind_k_joshi
Hello ,

I am calling web service written in java from php code.
The web service uses the JSON.
When I use the Chinese characters as input then they are not storing properly in to database.
I am using oracle as database which supports the UTF-8.
In some of the forum I saw discussion about the JSON_ENCODE function which is causing similar issues.
In my code I am also using the JSON_ENCODE function.
If anybody have any solution(code) for this Please reply.

Regards
Milind

Re: Webservice call from PHP using JSON

Posted: Tue Feb 14, 2012 2:13 pm
by Christopher
Read the first comment on the json_decode() documentation page. They have a function to prepare UTF-8 data.

http://us2.php.net/manual/en/function.json-decode.php