Home  >  Article  >  Backend Development  >  Data communication between Android mobile terminal and PHP and MySQL based on JSON. Chinese garbled problem

Data communication between Android mobile terminal and PHP and MySQL based on JSON. Chinese garbled problem

WBOY
WBOYOriginal
2016-08-08 09:25:051120browse

Original text

Server-side Chinese character encoding: gb2312

The JSON data sent from the server is always garbled on the Android side

Solution:

BufferedReader reader = new BufferedReader(
							new InputStreamReader(is,"GBK"));

The above introduces the Chinese garbled problem of JSON-based Android mobile terminal and PHP and MySQL data communication, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn