Fix character code