fix char decoding