char encoding fix