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



Windows中的certutil实用程序可用于执行Base64编码和解码。有没有内置的URL编码和解码实用程序?网上有很多免费的工具。但我正在专门寻找Windows内置的实用程序,或者如果不是简单的脚本,可以在Windows上运行。

谢谢!

Base64 VBA

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

URL编码/解码VBA

如何在Excel VBA中对字符串进行URL编码?VBA有内置的URL解码吗?是URL解码器。使用这些工具,您应该能够在Windows环境中使用MS Office产品(如Excel和VBA)进行编码和解码。

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

对我来说,[System.Net.WebUtility]工作而不是[System.Web.HttpUtility]

最新更新