import codecs with codecs.open('unicode.rst', encoding='utf-8') as f: for line in f: print repr(line)