EncodeURI for Win - Forum

Forum Navigation
You need to log in to create posts and topics.

EncodeURI for Win

Any one know how to EncodeURI a string on visualneo win?

Hi @shajujahra , you can create a VBScript function in menu>>option>>function library , like:

Function UrlEncode(url)
 For i = 1 To Len(url)
  n = Asc(Mid(url,i,1))
  If (n >= 48 And n <= 57) Or (n >= 65 And n <= 90) _
   Or (n >= 97 And n <= 122) Then
   UrlEncode = UrlEncode & Mid(url,i,1)
   ChrHex = Hex(Asc(Mid(url,i,1)))
                        For j = 0 to (Len(ChrHex) / 2) - 1
       UrlEncode = UrlEncode & "%" & Mid(ChrHex,(2*j) + 1,2)
  End If
End Function

nbSetVar "resultado",  UrlEncode("[%1]")

and  from your program:

SetVar "[resultado]" ""
Call "UrlEncode" "http://your url to encode" "resultado"


luishp, Vadim and 4 other users have reacted to this post.
luishpVadimsghoshnbuCN_IcemandanitoAndy Marshman

Using PowerShell:

$uri = 'https://example.com/string with space & OtherThings=?'
$ret = [uri]::EscapeDataString($uri)
echo $ret


David de Argentina

luishp, Vadim and CN_Iceman have reacted to this post.


You can send this function as a file?
And send a sample pub please.

hi @s7shanbe , sure...here you have it


Uploaded files:
  • You need to login to have access to uploads.
Vadim and s7shanbe have reacted to this post.



Utf-8 character encoding is not done properly?

hi @s7shanbe,

Even if you use for example, the encodeuri() function in javascript that does it in utf-8, VisualneoWin is only able to display ASCII/ANSI characters

Hi, @shajujahra

zmwClipTricks can encodeURI.

zmwClipTricks is available here, https://zmware.rcmediaservices.net/zmwcliptricks/


luishp, Vadim and Wrangler have reacted to this post.
Open chat
Do you need more info?
Hi, do you have any doubt?