目前,python的csv包还不能直接处理utf文档,所以读出后必须处理以下
如果要将含有中文ANSI文档的内容添加到数据库中,也是一样的
python 代码
- for row in reader:
- yield [unicode(cell, 'utf-8') for cell in row]
python 代码
- for row in reader:
- yield [unicode(cell, 'gb2312') for cell in row]