trivial encoder by notogawa

import Numeric
import Char
main=interact$f.lines
f[a,x]|x<"a"=d x|x<"s"=x#""|0<1=x#"A"
d x=showIntAtBase 256chr(read$"0x"++x)""
x#a=map toUpper$showHex(fst$readInt 256('\a'<)ord x!!0)a

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page