encode: rename nonUTF8Replacer
encode: added `escape` method
encode: improved `getInverseReplacer` function

now uses char classes if possible, which perform way better