From 05633b8758c2f48b0f3c9a558c956b458b19af18 Mon Sep 17 00:00:00 2001 From: bwarsaw <> Date: Fri, 26 Dec 2003 22:51:10 +0000 Subject: pending_requests(): Another part of TK's patch # 865661. Makes sure the user's full name is encoded in the list's charset properly. It also makes sure that the Subject description spans exactly one line. --- cron/checkdbs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cron/checkdbs b/cron/checkdbs index 39b12095..1c867c53 100755 --- a/cron/checkdbs +++ b/cron/checkdbs @@ -122,6 +122,7 @@ def main(): def pending_requests(mlist): # Must return a byte string + lcset = Utils.GetCharSet(mlist.preferred_language) pending = [] first = 1 for id in mlist.GetSubscriptionIds(): @@ -130,6 +131,8 @@ def pending_requests(mlist): first = 0 when, addr, fullname, passwd, digest, lang = mlist.GetRecord(id) if fullname: + if isinstance(fullname, UnicodeType): + fullname = fullname.encode(lcset, 'replace') fullname = ' (%s)' % fullname pending.append(' %s%s %s' % (addr, fullname, time.ctime(when))) first = 1 @@ -139,6 +142,7 @@ def pending_requests(mlist): first = 0 info = mlist.GetRecord(id) when, sender, subject, reason, text, msgdata = mlist.GetRecord(id) + subject = Utils.oneline(subject, lcset) date = time.ctime(when) reason = _(reason) pending.append(_("""\ -- cgit v1.2.3