Skip to content

Dependency scripts #1

Answered by kensain
movlordjoaky asked this question in Q&A
Discussion options

You must be logged in to vote

Hello, where can I find UriEncode script?

Sorry, I didn't include it in the repo. I will try to update it. The function is as follows:

UriEncode(Uri, RE := "[0-9A-Za-z]") {
    Var := Buffer(StrPut(Uri, "UTF-8"), 0)
    StrPut(Uri, Var, "UTF-8")
    While Code := NumGet(Var, A_Index - 1, "UChar") {
        if RegExMatch(Chr(Code), RE, &match)
            Res .= match[]
        else
            Res .= Format("%{:02X}", Code)
    }
    return Res
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kensain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants