URL encoder
mIRC Code
+ 0 likes
Please Register to submit score.
| Average Score | 0.0 |
| Scores Submitted | 0 |
| Date Added | Jul 29, 2007 |
| Last Updated | Jul 29, 2007 |
| Tags | encode percent url |
|
|
Introduction
Usage: $urlencode(text) will return the encoded text, and /urlencode text will echo the encoded text.
Do not enter the whole URL into the text, only the parameter values that need encoding.
mIRC Snippet:
URL encoder
Posted on Jul 29, 2007 1:25 pm
Posted on Jul 29, 2007 1:25 pm
Well 1. It didnt seem to work at all for me. //echo -a $urlencode(hmm testing;=!@#$%^&*) returned: hmm testing;=!@#$%^&*
And 2. If you do /urlencode 1 or any other number for that matter, it will give you an error. So I suggest you change the echo to echo -a.
And 2. If you do /urlencode 1 or any other number for that matter, it will give you an error. So I suggest you change the echo to echo -a.
mIRC Snippet:
URL encoder
Posted on Jul 29, 2007 4:51 pm
Posted on Jul 29, 2007 4:51 pm
Ok, -a is a good idea, but it sure works.
Maybe your mIRC ver., or other scripts.
Maybe your mIRC ver., or other scripts.
mIRC Snippet:
URL encoder
Posted on Jul 29, 2007 5:59 pm
Posted on Jul 29, 2007 5:59 pm
I don't see how it can work, there are quite a few errors with errors with the regex that I can see. $asc(t) would need to be changed to $asc(\t) and all of the []()/ etc. characters in the regex string should be prefixed with a \ so that they are interpreted as characters and not a closing bracket or something. Also there are special regex escape strings which would be much better for capturing all non alphanumeric characters.
mIRC Snippet:
URL encoder
Posted on Jul 29, 2007 6:42 pm
Posted on Jul 29, 2007 6:42 pm
Oh hmm I definitely entered it as \t, since I copied and pasted my script, but I added the backslash in.
The closing bracket character is escaped, and the only one that needs to be (since $ for example cannot mean the end of a string in a character class.)
Also, not all non-alphanumeric characters should be encoded (even if that is an idea) since only these characters and alpha-num form a valid URI according to internet standards. Even more so, the characters -_.~ should not be encoded.
The closing bracket character is escaped, and the only one that needs to be (since $ for example cannot mean the end of a string in a character class.)
Also, not all non-alphanumeric characters should be encoded (even if that is an idea) since only these characters and alpha-num form a valid URI according to internet standards. Even more so, the characters -_.~ should not be encoded.




