参考链接: 点击打开链接 点击打开链接 import os,sys print os.getcwd() # str1 = r"C:/Users/Hit/Desktop/文本/199801.txt" # f = open(str1.decode('utf8').encode('gbk')) str2 = 'C:/Users/Hit/Desktop/文本/199801.txt' path = unicode(str2,"utf8") fo = open(path) fo.read(20)