fix char encoding