special chars should be undone only after encoding