fix charset conversion