Webservice call from PHP using JSON

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
milind_k_joshi
Forum Newbie
Posts: 1
Joined: Tue Feb 14, 2012 5:25 am

Webservice call from PHP using JSON

Post 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
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Webservice call from PHP using JSON

Post 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
(#10850)
Post Reply