Package: apt-listchanges
Version: 2.85.1
Severity: normal
Forgot Patch - attached.
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (991, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.33-grml (SMP w/1 CPU core; PREEMPT)
Locale: lang=de_de.ut...@euro, lc_ctype=de_de.ut...@euro (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
--- o_apt_listchanges.py 2010-07-29 20:23:00.000000000 +0200
+++ n_apt_listchanges.py 2010-07-29 20:22:10.000000000 +0200
@@ -90,7 +90,7 @@
charset.header_encoding = email.Charset.QP
message = email.Message.Message()
message.set_charset(charset)
- subject = unicode(subject.decode(locale.getlocale()[1] or 'ascii',
'replace'))
+ subject = unicode(subject.decode(locale.getpreferredencoding() or 'ascii',
'replace'))
message['Subject'] = email.Header.Header(subject, 'utf-8')
message['To'] = address
message.set_payload(changes)
@@ -162,7 +162,7 @@
# (That's also the reason we do it line by line.)
# This is possibly wrong, but our best guess.
uline = line.decode('iso8859-1')
- newtext.append(uline.encode(locale.getlocale()[1] or 'ascii',
'replace'))
+ newtext.append(uline.encode(locale.getpreferredencoding() or
'ascii', 'replace'))
return '\n'.join(newtext)
def confirm(self):