jdunck / python-unicodecsv

Python2's stdlib csv module is nice, but it doesn't support unicode. This module is a drop-in replacement which *does*. If you prefer python 3's semantics but need support in py2, you probably want https://github.com/ryanhiebert/backports.csv
Other
594 stars 87 forks source link

Python 3 - Writing "ç" converted to ç in csv file #76

Open b1139 opened 7 years ago

b1139 commented 7 years ago
list_data = ['ë ï','Française de Mécanique','ü','ç']

f = open('C:\MFiles\\M.csv','wb')

cs = csv.writer(f,delimiter = '§',encoding='utf-8')

cs.writerow(list_data)

f.close()

When I look into M.csv I could see the below text

  1. ë ï§
  2. Franç
  3. aise de Mécanique§
  4. ü§
  5. ç

But when you look into the list I have only 4 strings

I want to write as ç character instead of §

Because the delimiter also §

Please help me how to go about