with open('myfile.csv', 'wb') as f:
    f.write('\ufeff'.encode('utf8'))
writer = csv.writer(f, delimiter=';', lineterminator='\n', quoting=csv.
    QUOTE_ALL, dialect='excel')
Django create CSV file that contains Unicode and can be opened directly with Excel