PHP post Chinese php post Chinese Java
I've verified a couple of states.
echo "Hello"; How are you doing
echo json_encode ("Hello")///u4f60/u597d I don't care
echo $_post[' key '//??
Actually I'm doing Android, the connection is org.apache.http under the
Solving how to post to PHP Chinese
Reply to discussion (solution)
It's a coding problem.
echo base64_encode ($_post[' key ');
Post the results
Encoding problem, received post value requires transcoding, Iconv
echo base64_encode ($_post[' key ');
Post the results
Send ' you ' to show pw==
echo base64_decode (' pw== '); Output?
That means ' you ' have become '? ' at the time of sending. The
echo base64_decode (' pw== '); Output?
That means ' you ' have become '? ' at the time of sending. The
The decode output is really '? '
I think it's a Java and PHP coding problem.
Because I PHP if the variable in Chinese, go to MySQL to do the query is no problem
Do you know how to change the code in php.ini?
echo base64_decode (' pw== '); Output?
That means ' you ' have become '? ' at the time of sending. The
It seems that it is possible to send the wrong time, no matter what the Chinese word is pw== if it is two words are pz8=
That's how you get the request.
The AddHeader don't know if there's any point.
List
listparams = new ArrayList
(), if (params! = null) {for (String Name:params.keySet ()) { Listparams.add (New Basicnamevaluepair (name, Params.get (name)));}} try{urlencodedformentity entity = new urlencodedformentity (listparams); HttpPost request = new HttpPost (URL), Request.addheader ("CharSet", HTTP. Utf_8); request.setentity (entity); return request;
This one? That one? You seem to have a code conversion problem, mark.
All right, thank you, I've already solved this.
urlencodedformentity entity = new Urlencodedformentity ( listparams);//change to urlencodedformentity entity = new Urlencodedformentity ( listparams,http. UTF-8);
If possible, just comment it out.