# -*- coding:utf-8 -*- import sys,os txta = open('a.txt','r') str = '' for line in txta: str += line.strip().decode('utf-8') txta.close() for word in str: print word.encode('utf-8') 直接输出,是会乱码的,得先解码,再编码. 参考网址:http://blog.csdn.net/devil_2009/article/de…