saving cyrillic text files

Denis S. Otkidach ods at fep.ru
Thu Aug 22 11:51:18 EDT 2002


On 22 Aug 2002, DR wrote:

D> file=open("rustext.txt", "w")
D> file.write("??????")
D> file.close
D>
D> When I open the file with a text editor I get garbled text. I
D> use
D> russian win98 so I don't see why this shouldn't work.

If you have created python script using GUI text editor (that
uses cp1251) and opened resulted file with console editor (that
uses cp866) or vice versa, than you get garbled text.  Try using
the same editor for both things.

-- 
Denis S. Otkidach
http://www.python.ru/      [ru]
http://diveinto.python.ru/ [ru]





More information about the Python-list mailing list