fix bad character code