This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tarek
Recipients lemburg, loewis, tarek
Date 2008-04-08.13:26:14
SpamBayes Score 0.00545841
Marked as misclassified No
Message-id <1207661184.56.0.396312221678.issue2562@psf.upfronthosting.co.za>
In-reply-to
Content
> For writing the metadata, we don't need to make any assumptions. We
> can just write the bytes as-is. This is how distutils has behaved
> for many releases now, and this is how users have been using it.

But write_pkg_file will use ascii encoding if we don't indicate it
here:

>>> pkg_info.write('Author: %s\n' % self.get_contact() )

So wouldn't a light fix in write_pkg_file() would be sufficient when a
unicode(field) fails, as MAL mentioned ? by trying utf8:

>>> try:
...    pkg_info.write('Author: %s\n' % self.get_contact() )
... except UnicodeEncodeError:
...    pkg_info.write('Author: %s\n' % self.get_contact().encode('utf8') ) 


As far as I know, this simple change will not impact people and will
just make it possible to use Unicode. And everything will be fine under
Py3K as it is now.

But I don't know yet how this would impact 3rd party softwares that reads
the egg-info file. But like MAL said, they will have to get fixed as well.
History
Date User Action Args
2008-04-08 13:26:24tareksetspambayes_score: 0.00545841 -> 0.00545841
recipients: + tarek, lemburg, loewis
2008-04-08 13:26:24tareksetspambayes_score: 0.00545841 -> 0.00545841
messageid: <1207661184.56.0.396312221678.issue2562@psf.upfronthosting.co.za>
2008-04-08 13:26:16tareklinkissue2562 messages
2008-04-08 13:26:15tarekcreate