本文介绍了如何从URL查询字符串中读取特殊字符(非英文字符)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从URL查询字符串中读取特殊字符(非英文字符)?

当我的查询字符串具有阿拉伯语的值时,如key =رياضه,值已更改并变为??? ?????

How to read special characters(non English characters) from URL query string?
when my query string has a value in Arabic language like "key=رياضه" the value changed and become ????????

推荐答案

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





然后在你的web.config文件中你应该有下一个设置来指定阿拉伯语的编码:



Then in your web.config file you should have the next settings for specifying encoding for Arabic:

<globalization fileencoding="windows-1256">
    requestEncoding="windows-1256" responseEncoding="windows-1256"/></globalization>


这篇关于如何从URL查询字符串中读取特殊字符(非英文字符)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 16:56
查看更多