Re: Error when trying to write unicode xml to zipfile

2007-07-10 Thread Stefan Behnel
Martin v. Löwis wrote: >> Unless, obviously, you were serialising to a non-utf8 encoding. But since the >> "toxml()" method seems to return unicode here (which sounds surprising), I >> expect it a) to provide no XML declaration at all or b) to be broken anyway. > > Or c) the user forgot to specify

Re: Error when trying to write unicode xml to zipfile

2007-07-10 Thread Martin v. Löwis
> Unless, obviously, you were serialising to a non-utf8 encoding. But since the > "toxml()" method seems to return unicode here (which sounds surprising), I > expect it a) to provide no XML declaration at all or b) to be broken anyway. Or c) the user forgot to specify the encoding= parameter in to

Re: Error when trying to write unicode xml to zipfile

2007-07-10 Thread Stefan Behnel
Gabriel Genellina wrote: > En Mon, 09 Jul 2007 20:11:24 -0300, Martin <[EMAIL PROTECTED]> > escribió: > >> I get below error when trying to write unicode xml to a zipfile. >> >> zip.writestr('content.xml', content.toxml()) >> File "/usr/lib/python2.4/zipfile.py", line 460, in writestr >>

Re: Error when trying to write unicode xml to zipfile

2007-07-09 Thread Gabriel Genellina
En Mon, 09 Jul 2007 20:11:24 -0300, Martin <[EMAIL PROTECTED]> escribió: > I get below error when trying to write unicode xml to a zipfile. > > zip.writestr('content.xml', content.toxml()) > File "/usr/lib/python2.4/zipfile.py", line 460, in writestr > zinfo.CRC = binascii.crc32(bytes)

Error when trying to write unicode xml to zipfile

2007-07-09 Thread Martin
I get below error when trying to write unicode xml to a zipfile. zip.writestr('content.xml', content.toxml()) File "/usr/lib/python2.4/zipfile.py", line 460, in writestr zinfo.CRC = binascii.crc32(bytes) # CRC-32 checksum UnicodeEncodeError: 'ascii' codec can't encode character u'\