inpath = 'E:\MyProject\SVN_Project\Drawingboard_local\model\mydata\input\production\示波器\0.htm'
uipath = unicode(inpath, "utf8")
然后用"uipath"经过编码后的路径去open()即可:
fin = open(uipath)
解决方法为:创建数据表时指定charset=utf8,如:
use hongxiudb
create table if not exists hongxiu(
name text,
author text,
intro text
)engine=InnoDB default charset=utf8