On Sun, Aug 05, 2007 at 04:43:11PM +0200, Wolf Wiegand wrote: > Hi, > > the attached patch is an attempt at fixing this issue.
Good catch, but the proper way is to put the po in utf8. I'll do that,
thanks.
> --- /usr/share/apt-listchanges/apt_listchanges.py.bak 2007-08-05
> 16:09:31.142825768 +0200
> +++ /tmp/apt_listchanges.py 2007-08-05 16:37:27.238341008 +0200
> @@ -89,6 +89,20 @@
> def mail_changes(address, changes, subject):
> print "apt-listchanges: " + _("Mailing %s: %s") % (address, subject)
>
> + # convert and encode subject to utf-8
> + # unfortunately, the .po-files are either utf-8 or iso8859,
> + # so we'll just try to convert them to utf-8
> + try:
> + subject = subject..decode("iso8859")
> + except:
> + pass
> +
> + # try..except, just in case converstion to utf-8 failed
> + try:
> + subject = email.Header.Header(subject, "utf-8").encode()
> + except:
> + pass
> +
> charset = email.Charset.Charset('utf-8')
> charset.body_encoding = '8bit'
> charset.header_encoding = email.Charset.QP
--
·O· Pierre Habouzit
··O [EMAIL PROTECTED]
OOO http://www.madism.org
pgpkEX8ry9be4.pgp
Description: PGP signature

