windows - Windows 是否有任何内置实用程序来编码/解码 URL?

标签 windows urlencode url-encoding urldecode

Windows中的certutil utiliiy可以用来进行Base64编码和解码。是否有用于 URL 编码和解码的内置实用程序?网上有许多免费工具。但我特别在寻找 Windows 内置实用程序,或者如果不是可以在 Windows 上运行的简单脚本的话。

谢谢!

最佳答案

Base64 VBA

Base64编码和解码可以用VBA来完成。您可以复制/粘贴 this code例如,将其放入 Excel VBA 中,然后使用它的方法对 Base64 进行编码和解码。

URL 编码/解码 VBA

How can I URL encode a string in Excel VBA?Does VBA have any built in URL decoding?是一个 URL 解码器。使用这些工具,您应该能够在 Windows 环境中使用 Excel 和 VBA 等 MS Office 产品进行编码和解码。

Base64 PowerShell

如果您使用 powershell,请查看:http://vstepic.blogspot.com/2013/02/how-to-convert-string-to-base64-and.html .摘自该网站:

PS C:\Temp>$b  = [System.Text.Encoding]::UTF8.GetBytes("Hello World")
PS C:\Temp>[System.Convert]::ToBase64String($b)
SGVsbG8gV29ybGQ=

PS C:\Temp>$b  = [System.Convert]::FromBase64String("SGVsbG8gV29ybGQ=")
PS C:\Temp>[System.Text.Encoding]::UTF8.GetString($b)
Hello World

URL 编码/解码 PowerShell

对于 URL 编码/解码,您可以使用:

[Reflection.Assembly]::LoadWithPartialName("System.Web") | Out-Null
[System.Web.HttpUtility]::UrlEncode("http://test.com/?path=what is")
http%3a%2f%2ftest.com%2f%3fpath%3dwhat+is

[System.Web.HttpUtility]::UrlDecode("http%3a%2f%2ftest.com%2f%3fpath%3dwhat+is")
http://test.com/?path=what is

引用:https://gallery.technet.microsoft.com/scriptcenter/Encoding-and-Decoding-URL-99dc4256

关于windows - Windows 是否有任何内置实用程序来编码/解码 URL?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34447793/

相关文章:

windows - 如何使用MFC统计Windows中每个进程的线程数

Python:MySQLdb 在 Linux 上运行良好,而不是在 Windows 上

中文字符的PHP urlencode

http - URL 编码是/或否?

java - 解码多次编码的字符串

windows - COM dll 不再注册

python - 确定当前用户是否在管理员组中(Windows/Python)

IE 中的 jQuery ajax 调用 - 编码

html - 如何在 HTML 中编码 href 属性

java - Apache HttpClient HttpGet url 带冒号