PHP Mysql Json和阿拉伯语 [英] PHP Mysql Json and Arabic language

查看:126
本文介绍了PHP Mysql Json和阿拉伯语的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在mysql中使用php和html格式插入了阿拉伯数据。将数据插入到mysql表中后,数据看起来就像这样Ù...رØبااÙعاÙÙ...但是,当我将这些数据选到我的网页上时,会显示完美的阿拉伯语句子。但是,当我将这个数据暴露给json_encode函数并尝试从android中读取这些数据时,android会在解析json之后显示Ù...رØبااÙعاÙÙ...有没有办法在android中有意义地表示这些数据。

I have been inserting Arabic language data in mysql using php and an html form. After inserting data into mysql table the data looks like this مرحبا العالم However when i select this data onto my web page it shows perfect arabic sentence. However when i expose this data to json_encode function and try to read this data from android, the android shows مرحبا العالم after parsing json. Is there any way to represent this data in android meaningfully.

更新:

http-equiv="Content-Type" content="text/html; charset=utf-8"



我也在我的显示页面中使用这个元标记。没有这个元标记,我的浏览器也显示了这样的数据Ù...رØبااÙعاÙÙ...

i am also using this meta tag in my show page. Without this meta tag my browser also shows data as like this مرحبا العالم

谢谢

推荐答案

您如何通过MySQL查看?油灰?确保您的终端编码设置为UTF-8而不是ASCII。

How are you viewing it through MySQL? Putty? Make sure you have your terminal encoding set to UTF-8 and not ASCII.

编辑:尝试完成后,我不得不将我的Putty编码设置为 Win1256 ,以便角色在控制台中正确显示。

After trying this, I had to set my Putty encoding to Win1256 for the characters to appear correctly in the console.

腻子设置

这篇关于PHP Mysql Json和阿拉伯语的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆