correct char encoding