Fix UnicodeEncodeError.