Character replacement was buggy.
Handling unicode properly.