Add experimental UTF-8 support, bugfix in subs

Add experimental support for UTF-8, and fix substitutions to use null
byte placeholders instead of hackish ROT13 ones that can sometimes
break.