how to write file with cp1250 encodings?

Grzegorz Smith gregtech at wp.pl
Sun Feb 26 19:24:56 EST 2006


Hi all. I have got situation: i load data from database(MSSQL) wchich are
encoded cp1250 and I fill template with that data (Cheetah Template), after
all i want to save template to file on disk. I'm using 
newfile = open("template.html",w")
newfile.write(str(template))
newfile.close()
But data encodings are saved wrong, and I try diffrent programs to convert
but all i get was only mess. So is this any way to save data with encodings
cp1250 properly? 
Any help will be very appreciated
Gregor



More information about the Python-list mailing list