Skip to content

Instantly share code, notes, and snippets.

@samarthbhaskar
Created April 30, 2013 16:24
Show Gist options
  • Save samarthbhaskar/5489848 to your computer and use it in GitHub Desktop.
Save samarthbhaskar/5489848 to your computer and use it in GitHub Desktop.
unicode sucks
import csv
reader = csv.reader(open("/Users/sbhaskar/Dropbox/All_out/french_results/CSV/Sheet_1.csv","rU"))
for r in reader:
print r
import unicodedata
source = r
output=[]
for s in r:
t=unicodedata.normalize('NFKD', unicode(s)).encode('ascii', 'ignore')
output.append(t)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment