To be honest I'm not sure why the change from `\x7f` to `~` is required. The other change is to allow a few common ASCII characters: TAB, CR, LF.