URI操作 [英] URI manipulation

查看:65
本文介绍了URI操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

获取URI时,有时它包含字符组合

替换某些字符,例如%20为了一个空间。 .NET框架中是否有一个函数

将这些函数转换为正确的字符?

ie


" c: \ my%20folder\my%20file.jpg"


to


" c:\ my folder \ my file .jpg"


提前致谢。


尼克。


-

/ \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \\ \\ / \ / \ / \ / \ / \ / \

无论如何。无论结果如何,你都会被改变。


Fergus - 2003年9月5日

/ \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \\ \\ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \

Hi there,

When getting an URI sometimes it contains character combinations to
replace certain characters, such as "%20" for a space. Is there a function
in the .NET framework that converts these into their correct characters?
i.e.

"c:\my%20folder\my%20file.jpg"

to

"c:\my folder\my file.jpg"

Thanks in advance.

Nick.

--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
"No matter. Whatever the outcome, you are changed."

Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\

推荐答案

我认为解码URL可能是我正在寻找的短语。如果我需要写我自己的功能来做这个,那么有谁知道我能在哪里找到

任何关于特殊字符是什么以及它们应该是什么的参考

替换为?再次感谢:-)


尼克。


-

/ \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \\ \\ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \

无论如何。无论结果如何,你都会被改变。


Fergus - 2003年9月5日

/ \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \\ \\ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \
I think decoding an URL might be the phrase that I am looking for. If I
need to write my own function to do this does anyone know where I can find
any reference to what the special characters are and what they should be
replaced for? Thanks again :-)

Nick.

--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
"No matter. Whatever the outcome, you are changed."

Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\


Nick,

这是来自文档对象模型(mshtml)

URLUnencoded

在MSDN上查找

据我了解你,它是否符合你的要求,但你使用的是

mshtml

(也许你可以用一些JScript来做到这一点

Cor
Nick,
This is from the document object model (mshtml)
URLUnencoded
Look for this on MSDN
As far as I understand you, does it exact what you ask, but are you using
mshtml
(Maybe you can do it with some JScript)
Cor


你好,


" Nak" ; < a@a.com> schrieb:
Hello,

"Nak" <a@a.com> schrieb:
但是当我使用.location.
URLUnencoded时,我得到了错误。物业我得到未定义
返回。如果我使用URL,我会得到编码的URL但是当我使用URLUnencoded时它不起作用。是否无法解析.NET中的URL?
But I get errors with that as when I use the ".location.
URLUnencoded" property I am getting "undefined"
returned. If I use URL I get the encoded URL but when
I use URLUnencoded it doesn''t work. Is there no way of
decoding an URL within .NET?




请使用''document.URLUnencoded''。


-

Herfried K. Wagner

MVP·VB Classic,VB.NET
http://www.mvps.org/dotnet


这篇关于URI操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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