带有重音字符的查询字符串 [英] Querystring with accented characters

查看:79
本文介绍了带有重音字符的查询字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当某些欧洲字符包含在

中的URL的查询字符串时,我遇到了一个问题。


如果我有这样的网址:?param = AA?*


在接收页面上,一个简单的Request()调用返回AA。而不是AA?*。


它会丢弃所有重音字符!


如果我改为使用表格而不是工作正常。


如果我将Request.QueryString复制到一个String变量并拆分它我管理

来获得正确的值。


我在Windows 2000和Windows 2003上尝试了相同的结果。


这是一个已知的Request.QueryString错误吗?如果有的话还有一个

修复/解决方法?


谢谢


John Byrne

澳大利亚

解决方案

我的问题没有问题。你尝试过不同的浏览器吗?在视图源中是否正好显示

?你试过URLEncoding吗?


Ray在家里

" John Byrne" <乔******* @ discussions.microsoft.com>在留言中写道

新闻:1F ********************************** @ microsof t.com ...

我在URL的查询字符串中包含某些欧洲字符时遇到了问题。

如果我有一个URL,如:?param = AA?

在接收页面上,一个简单的Request()调用返回AA。而不是AA? 。

它删除了所有重音字符!

如果我改为使用表格,它就可以了。

如果我复制了Request.QueryString到一个String变量并将其拆分我
管理
以获得正确的值。

我在Windows 2000和Windows 2003上尝试过这个结果相同。<这是Request.QueryString的已知错误吗?如果是这样有一个
修复/解决方法?

John Byrne
澳大利亚



这是一个ASP请求对象问题。不同的浏览器没有区别。


在服务器端获取参数的行为有所不同,具体取决于请求ASP页面的方式



提交表单时按预期工作,但如果请求页面

通过URL,则Request(< parm>)不会返回重音字符。


谢谢


Ray Costanzo [MVP]"写道:

我的问题没有问题。你尝试过不同的浏览器吗?它在视图源中是否正确?你有没有试过URLEncoding呢?

Ray在家里

" John Byrne" <乔******* @ discussions.microsoft.com>在消息中写道
新闻:1F ********************************** @ microsof t.com。 ..

我在URL的查询字符串中包含某些欧洲字符时遇到了问题。

如果我有一个像这样的URL :?param = AA ??

在接收页面上,一个简单的Request()调用返回AA。而不是AA ?? 。

它删除了所有重音字符!

如果我改为使用表格,它就可以了。

如果我复制了Request.QueryString到一个String变量并将其拆分我
管理
以获得正确的值。

我在Windows 2000和Windows 2003上尝试过这个结果相同。<这是Request.QueryString的已知错误吗?如果是这样有一个
修复/解决方法?

John Byrne
澳大利亚







" John Byrne" <乔******* @ discussions.microsoft.com>在留言中写道

新闻:D2 ********************************** @ microsof t.com ...

这是一个ASP请求对象问题。不同的浏览器没有



的区别。


不一定。


你错过了这个部分吗在哪里我问是吗?出现在视图源中?如果

那么,这是一个浏览器问题。我不是说这就是问题所在,但是

它有助于排除它...


Ray at work


I have encountered a problem when certain European characters are included in
the Querystring of an URL.

If I have a URL like: ?param=AA?*

On the receiving page a simple Request() call returns "AA" and not "AA?*".

It drops all accented characters!

If I change to use a Form instead, it works OK.

If I copy the Request.QueryString to a String variable and split it I manage
to get the proper value.

I have tried this on Windows 2000 and Windows 2003 with the same result.

Is this a known bug with Request.QueryString? And if so is there a
fix/workaround??

Thanks

John Byrne
Australia

解决方案

No issues on my end. Have you tried a different browser? Does it appear
right in a view-source? Have you tried URLEncoding it?

Ray at home
"John Byrne" <Jo*******@discussions.microsoft.com> wrote in message
news:1F**********************************@microsof t.com...

I have encountered a problem when certain European characters are included
in
the Querystring of an URL.

If I have a URL like: ?param=AA?

On the receiving page a simple Request() call returns "AA" and not "AA? ".

It drops all accented characters!

If I change to use a Form instead, it works OK.

If I copy the Request.QueryString to a String variable and split it I
manage
to get the proper value.

I have tried this on Windows 2000 and Windows 2003 with the same result.

Is this a known bug with Request.QueryString? And if so is there a
fix/workaround??

Thanks

John Byrne
Australia



This is an ASP Request object problem. Different browser makes no difference.

Getting parameters on the server side behaves differently depending on how
the ASP page was requested.

It works as expected when a form is submitted, but if the page is requested
via URL then Request("<parm>") doesn''t return accented characters.

Thanks

"Ray Costanzo [MVP]" wrote:

No issues on my end. Have you tried a different browser? Does it appear
right in a view-source? Have you tried URLEncoding it?

Ray at home
"John Byrne" <Jo*******@discussions.microsoft.com> wrote in message
news:1F**********************************@microsof t.com...

I have encountered a problem when certain European characters are included
in
the Querystring of an URL.

If I have a URL like: ?param=AA??

On the receiving page a simple Request() call returns "AA" and not "AA?? ".

It drops all accented characters!

If I change to use a Form instead, it works OK.

If I copy the Request.QueryString to a String variable and split it I
manage
to get the proper value.

I have tried this on Windows 2000 and Windows 2003 with the same result.

Is this a known bug with Request.QueryString? And if so is there a
fix/workaround??

Thanks

John Byrne
Australia






"John Byrne" <Jo*******@discussions.microsoft.com> wrote in message
news:D2**********************************@microsof t.com...

This is an ASP Request object problem. Different browser makes no


difference.

Not necessarily.

Did you miss the part where I asked if the ? appears in a view-source? If
so, it''s a browser problem. I''m not saying that this is the problem, but
it''d help to rule it out...

Ray at work


这篇关于带有重音字符的查询字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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