Svennglenn wrote: > # -*- coding: cp1252 -*- > > titel = "���" > titel = unicode(titel)
Instead of this, just write
# -*- coding: cp1252 -*-
titel = u"���"
> fil = open("testfil.txt", "w")
> fil.write(titel)
> fil.close()
Instead of this, write
import codecs
fil = codecs.open("testfil.txt", "w", "cp1252")
fil.write(titel)
fil.close()
Instead of cp1252, consider using ISO-8859-1.
Regards,
Martin
--
http://mail.python.org/mailman/listinfo/python-list
