'==================================================
'UrlEncodeUtf8: 文字列をUTF-8でエンコードするFunction
'==================================================
'strSource: 元の文字列
'返り値: エンコードされた文字列
'==================================================
Public Function UrlEncodeUtf8(ByRef strSource As String) As String
Dim objSC As Object
Set objSC = CreateObject("ScriptControl")
objSC.Language = "Jscript"
UrlEncodeUtf8 = objSC.CodeObject.encodeURIComponent(strSource)
Set objSC = Nothing
End Function
'==================================================
'UrlDecodeUtf8: 文字列をUTF-8でデコードするFunction
'==================================================
'strSource: 元の文字列
'返り値: エンコードされた文字列
'==================================================
Public Function URLDecodeUTF8(strSource As String) As String
Dim objSC As Object
Set objSC = CreateObject("ScriptControl")
objSC.Language = "Jscript"
URLDecodeUTF8 = objSC.CodeObject.decodeURIComponent(strSource)
Set objSC = Nothing
End Function
参照元
http://komet163.blog36.fc2.com/blog-entry-18.html
なんでもリンク
@YOU