Fix encoding issues during conversion.