fix char encoding issue