I am trying to write hindi to a csv in Python, eg:
import csv
posts = open('test.csv', mode='w', errors='ignore')
post_writer_hindi = csv.writer(posts, delimiter=',', quotechar='\"', quoting=csv.QUOTE_MINIMAL)
post_writer_hindi.writerow(['नमस्ते'])
This results in nothing being actually written. How should this be done?
open('test.csv', mode='w', errors='ignore')
set the encoding to encoding = 'utf-8'
so it will be open('test.csv', mode='w', encoding = 'utf-8', errors='ignore')