Fix output encoding issues.