fix char encode