エンコーディングの仕組みを理解するのに苦労しています:
Python コード内の文字列をエンコードできる理由:
s = 'Au\xc3\x9fenformat\n'
print s.encode('utf-8')
>>>Außenformnat
しかし、テキスト ファイルからそのような文字列を読み取ると、次のようになります。
f = open('out.txt', 'r')
data = f.read()
print data.encode('utf-8')
>>>Au\xc3\x9fenformat\n
助言がありますか?