Fix string encoding issues