In [1]: with open('/tmp/1', 'w+', encoding='cp1251') as f: f.write('qwertyйцукен')
In [2]: cat /tmp/1
qwerty������
In [3]: with open('/tmp/1', 'r', encoding='cp1251') as f: print(f.read())
qwertyйцукен
In [4]: with open('/tmp/1', 'r', encoding='cp1251') as f:
...: with open('/tmp/2', 'w+', encoding='utf-8') as o: o.write(str(f.read()))
...:
In [5]: cat /tmp/2
qwertyйцукен