On Sun, 08 May 2005 11:23:49 +0200, "Martin v. L�wis"
<[EMAIL PROTECTED]> wrote:
>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.
Martin, I can't guess the reason for this last suggestion; why should
a Windows system use iso-8859-1 instead of cp1252?
Regards,
John
--
http://mail.python.org/mailman/listinfo/python-list