如何在IE中的地址栏网址中使用unicode字符 [英] How can use unicode characters in addressbar url in IE
问题描述
嗨.
如何以地址栏和unicode格式显示我的网址.
当我在response.redirect("http://mysite/?current =سلام");中编写unicode文本时;
在Chrome和Firefox中都可以.但我看到soem %% ???在IE中.
我知道这个网站有解决方案:
http://www.varzesh3.com/news.do?itemid=45189&title=ليگ_برتر_فوتبال_انگليس_ركورد_شكست_
而这个:
http://www.tabnak.ir/fa/news/167612/17-هرم-جدید-در-مصر-کشف-شد
有什么主意吗?
谢谢你.
Hi.
how can i show my url in addressbar un unicode format.
when i write unicode text in my response.redirect("http://mysite/?current=سلام");
it is ok in Chrome and firefox. but i see soem %%?? in IE.
i know there is a solution coz this site :
http://www.varzesh3.com/news.do?itemid=45189&title=ليگ_برتر_فوتبال_انگليس_ركورد_شكست_
And This :
http://www.tabnak.ir/fa/news/167612/17-هرم-جدید-در-مصر-کشف-شد
Is there any idea?
Thank u.
推荐答案
我不知道为什么,但是我发现你使用response.redirect("unicode text");您无法在IE中看到unicode文本.
但是,如果您使用Hyperlink或(标签),则可以正确地看到URL中的unicode.
例如:
I dont know why, but i found out it u use response.redirect("with unicode text"); u cant see the unicode text in IE.
But if u use Hyperlink or (a Tag) u can see the unicode in URL currectly.
For example :
<asp:HyperLink ID="HyperLink1" runat="server"
NavigateUrl="~/TrimDemo.aspx?current=سلام">سلام</asp:HyperLink>
<a href="TrimDemo.aspx?current=سلام">خداحافظ</a>
<asp:LinkButton ID="LinkButton1" runat="server" onclick="LinkButton1_Click">LinkButton</asp:LinkButton>
并在codeBehind中:
And in codeBehind :
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Redirect("~/TrimDemo.aspx?current=سلام");
}
如果您支持该unicode语言,则超链接和(一个Tag)将显示Currect名称,
但是无论如何,从linkbutton重定向仍会在IE中显示%&&%d的内容
谢谢.
Hyperlink and (a Tag) show Currect name if u support that unicode language,
But Redirect from linkbutton show something with %&&%d in IE anyway
Thanks any way.
您不能.由Internet浏览器显示URL.如果我将2个网址之一复制并粘贴到Internet Explorer 9中,则显示正确.但是重定向显示错误.
You cannot. It is up to the internet browser to show the URL. If I copy & past one of the 2 urls into Internet Explorer 9 it show correct. But redirect it show wrong.
这篇关于如何在IE中的地址栏网址中使用unicode字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!