This solution may not be perfect, hope it works for you though. I assume you are using mIRC 6.21, since you did not say. If you want to use this to say something in the channel use /msg $chan $ascii(text) or /msg $chan $normal(text). You could use $isid to see if it is an identifier or command, and message the channel if its a command.

Code:
ascii {
  var %c = 1
  var %ret
  while (%c <= $len($1)) {
    /* use $mid($1,%c,1) gets char from position stored in %c
    *  use $asc() to convert character to ascii
    *  use $base to convert to base 16, and 0 pad line
    *    this allows spaces to be removed
    */
    var %ret = %ret $+ $base($asc($mid($1,%c,1)),10,16,2)
    inc %c
  }
  return %ret
}

normal {
  var %c = 1
  var %ret
  while (%c <= $len($1)) {
    var %chr = $mid($1,%c,2)
    /* to handle spaces correctly, convert them to a unique sequence <space>
    *  change < to <lt> and > to <gt>, just in case "<space>" is in the text
    */
    if (%chr == 20) {
      var %ret = %ret $+ <space>
    }
    elseif (%chr == 3C) {
      var %ret = %ret $+ <lt>
    }
    elseif (%chr == 3e) {
      var %ret = %ret $+ <gt>
    }
    else {
      var %ret = %ret $+ $chr($base(%chr,16,10))
    }
    inc %c 2
  }
  ;use $replace to get $chr(32), $chr(60), and, $chr(62) back
  return $replace(%ret,<space>,$chr(32),<lt>,<,<gt>,>)
}