Fix for invalid characters in CSV input