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
Webservice call from PHP using JSON
Moderator: General Moderators
-
milind_k_joshi
- Forum Newbie
- Posts: 1
- Joined: Tue Feb 14, 2012 5:25 am
- 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
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
http://us2.php.net/manual/en/function.json-decode.php
(#10850)