我正在为调查应用创建网络服务。
在app中,用户可以选择调查为印地语或英语。
英语调查中的每一件事都很完美。
在英语调查中,我将json从android下载到PHP。
{"survey_user":"20141112_115344","caste":"","contact":"","datastreams":[{"answer":"Yes","questionID":"61"},{"answer":"Computer","questionID":"62"}],"polling_booth_no":"126","Image_file":"IMG_121415773426063-1492383430.jpg","userID":"12","address":"","email":"","age":"","name":"","gender":"","longitude":75.8138678,"language":"","latitude":30.8962427,"Audio_file":"12_Audio1415773383664-1588847750.3gp","survey_num":"32"}
但问题来自我在印地文获得json。
{"survey_user":"20141112_115344","caste":"","contact":"","datastreams":[{"answer":"????","questionID":"61"},{"answer":"????","questionID":"62"}],"polling_booth_no":"126","Image_file":"IMG_121415773426063-1492383430.jpg","userID":"12","address":"","email":"","age":"","name":"","gender":"","longitude":75.8138678,"language":"","latitude":30.8962427,"Audio_file":"12_Audio1415773383664-1588847750.3gp","survey_num":"32"}
我真的不知道android或php的问题在哪里。
静态印地语值保存在数据库中,使用后mysql_set_charset('utf8',$link);
我检查了它但动态json总是给“?????”值。 Plesae告诉我如何解决。
答案 0 :(得分:0)
@Amit kumar,你应该使用
collection " `utf8_general_ci` " in database table field
保存您的HINDI数据并使用
`header("Content-type: text/html; charset=UTF-8");`
位于php文件的顶部,您可以在其中检索hindi数据..