unicode string problems

Gonçalo Rodrigues op73418 at mail.telepac.pt
Mon Apr 1 17:41:31 EST 2002


My problem is the following:

Let f be a file object. If I do

f.write("Março 2002")

all goes well. But if I try

f.write("Março 2002" + march.Name())

where march.Name() returns a unicode string I get a unicode error. I
tried converting both unicodes to strings via str but obviously I got an
error (in the first string the culprit is the "ç" character).

Can someone help me out here and show me the way to write these strings
to the file?

Thank for everything, best regards,
Gonçalo Rodrigues




More information about the Python-list mailing list