correct char-encoding errors