change a character code