hex & html encode/decode

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Feb 25, 2009
16
0
#1
Okay, I'm probably the only person in the world using TCC to write back end website code, but...

%@hexencode[{"chars",}string] => convert all characters other than [0-9A-Za-z+_=&-] to %xx hex notation, with the option to specify a list of characters to convert

%@hexdecode[{"chars",}string] => reverse the above

%@htmlencode[{"chars",}string] => convert common characters to &entity; notation (common being < > & and so forth), with the option to specify a list of characters to convert

%@htmldecode[{"chars",}string] => reverse the above

There's probably a need to escape/unescape strings, too -- similar to add/strip slashes in php -- but I've not put much thought to that.