import codecs import csv def csv_unireader(f, encoding="utf-8"): for row in csv.reader(codecs.iterencode(codecs.iterdecode(f, encoding), "utf-8")): yield [e.decode("utf-8") for e in row]