I'm using Python 3.7 to write a .csv file with the build in lib csv. The error occurs if input contains the Unicode character "White bullet" https://unicode-table.com/en/search/?q=%E2%97%A6:
◦
Code:
with open(filename, 'w', newline='', encoding='ansi') as csvfile:
filewriter = csv.writer(csvfile, delimiter=';', quoting=csv.QUOTE_MINIMAL)
filewriter.writerow(['H', debitor, None, customer_name, notes, setup.HQ])
Error:
'mbcs' codec can't encode characters in position 0--1: invalid character
Is this a bug or is there some limitation I'm not aware of?