I am currently trying to output a csv file with a few European languages like German and Spanish. When I create the file, I need to specify an encoding in order to not get messed up output. I tried iso-8859 and cp1252, but there has to be at least a few characters that are messed up (meaning that they are not from the language). Code:
output = open('output.csv', 'w', newline="", encoding='iso_8859_1')
The input that I give to the file is from OpenAI's API.