with open(file, encoding="latin-1") as f meanig code example Example: open python choose encoding open(filename, encoding='ISO-8859-15')