Windows是否具有任何内置实用程序来对URL进行编码/解码? [英] Does Windows have any built-in utility to encode/decode URL?

查看:223
本文介绍了Windows是否具有任何内置实用程序来对URL进行编码/解码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

The certutil utiliiy in Windows can be used to perform Base64 encoding and deocding. Is there any built-in utility for URL encoding and decoding? There are many free tools available on web. But I am specifically looking for Windows built-in utility or if not simple script that can run on Windows.

谢谢!

推荐答案

Base64 VBA

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

Base64 encoding and decoding can be done with VBA. You can copy/paste this code and put it in Excel VBA, for example, and then use it's methods to encode and decode Base64.

URL编码/解码VBA

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

How can I URL encode a string in Excel VBA? and Does VBA have any built in URL decoding? is a URL decoder. Using these tools you should be able to encode and decode within Windows environment with MS Office products such as Excel and VBA.

Base64 PowerShell

如果您使用Powershell,请查看以下内容:

If you use powershell, check this out: http://vstepic.blogspot.com/2013/02/how-to-convert-string-to-base64-and.html. Excerpt from that site:

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编码/解码,您可以使用:

For URL encode/decode you could use:

[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是否具有任何内置实用程序来对URL进行编码/解码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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