Gary, thank you again. That’s great.
I modified your code a little bit, so it will ask for input and will respond with any encoded and decoded character.
local urlChar, input
gettext "Enter special character!", input
urlChar=radixstr("hex",texttobinary(input))
urlChar="%"+urlChar[1,2]+"%"+urlChar[3,4]+sandwich("%",urlChar[5,6],"")
message urlChar // encoded character
message hextobinary(replace(urlChar,"%","")) // decoded character