我的android程序中有波斯语字符的异国情调问题 [英] i have an exotic problem with persian characters in my android program
问题描述
H ello人。我正在研究我的项目。我必须通过我的Android应用程序发送单词到服务器应用程序。发送后,我将能够搜索一些调查和研究,并将这些信息返回给Android用户。我的用户使用波斯语字符搜索他们适当的主题。
我发现当我将它们(波斯语)发送到服务器时,它(服务器)无法正确识别它们!它适用于????流而不是正确的单词!它只是有这个问题的波斯语单词是从Android应用程序发送而不是英语单词。我从来没有尝试过其他语言,但我认为它也存在这个问题。我认为我的移动设备有不同的波斯语字符代码。
W 帽子你认为我应该如何解决我的问题。
提前感谢
Mahmud Shahrokni
Hello people . i am working on my project . i have to send words to the server application via my android application . after i send them , i will able to search some survey and research and return these information to the android user. my users use "Persian" characters to search their appropriate subjects.
I found that when i send them (persian words) to the server ,it (server) cant recognize them correctly ! it works on a stream of " ???? " instead of correct words ! it just has this problem with Persian words which are sent from android app not English words . I have never tried other languages but i think it also has this problem with them .i think my mobile device has different code for Persian characters.
What do you think and how should i solve my problem .
thanks in advance
Mahmud Shahrokni
推荐答案
试试这个方法:
HttpUtility.UrlEncode('سلام');
并将refrence的system.web添加到你的项目中。 (C#解决方案)
Try this method:
HttpUtility.UrlEncode('سلام');
and add system.web from refrences to your project. (C# solution)
这篇关于我的android程序中有波斯语字符的异国情调问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!