阿拉伯语查询字符串问题(????中值) [英] Arabic QueryString problem (???? in the value)

查看:212
本文介绍了阿拉伯语查询字符串问题(????中值)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我送了一个查询字符串值阿拉伯语,在服务器上检索时,该值是错误的,是用引号(????)取代。
例如:
HTTP://server/mypage.aspx QS =مرحبا
的Request.QueryString(QS)的值是?????

I am sending an arabic value in a querystring, when retrieving it on the server, the value is erroneous and is replaced by quotation marks (????). for example: http://server/mypage.aspx?qs=مرحبا the value of Request.QueryString("qs") is ?????

请注意Response.Write(مرحبا')正确执行。

Note that Response.Write('مرحبا') executes correctly.

这个查询字符串问题的任何想法?

Any idea about this querystring problem?

感谢。

推荐答案

只是URL连接code阿拉伯语字符串,它应该工作正常。

Just URL Encode the arabic string and it should work fine.

编辑:你必须把它在查询字符串URL前恩code字符串

You must URL Encode the string before putting it in the querystring.

举例来说,如果你给url EN code中的空格字符,它会在你的查询字符串显示为20%,是这样的:

For instance, if you were to url encode the space character, it will appear as %20 in your querystring, like this:

http://foo.com/dosomething?param1=hello%20world

随后的Hello World

Then when you read param1 you URL Decode it, and you get the string "hello world"

您还可以恩URL code的每一个字符,但对于常规字符是没有意义的。

You could also URL Encode every single character but for regular characters it's pointless.

这篇关于阿拉伯语查询字符串问题(????中值)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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