[ mailman-Patches-984682 ] header is not converted to unicode when sending reminder

SourceForge.net noreply at sourceforge.net
Sat Jul 3 14:07:06 EDT 2004


Patches item #984682, was opened at 2004-07-03 20:07
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=300103&aid=984682&group_id=103

Category: command line scripts
Group: Mailman 2.1
Status: Open
Resolution: None
Priority: 5
Submitted By: Arkadiusz Miskiewicz (arekm)
Assigned to: Nobody/Anonymous (nobody)
Summary: header is not converted to unicode when sending reminder

Initial Comment:
[root at anduril cron]# su - mailman -s /bin/sh -c "python -S 
/var/lib/mailman/cron/mailpasswds -l pld-rc-scripts"
Traceback (most recent call last):
  File "/var/lib/mailman/cron/mailpasswds", line 239, in ?
    main()
  File "/var/lib/mailman/cron/mailpasswds", line 214, in main
    text += (header + '\n' + NL.join(table))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xb3 in position 
44: ordinal not in range(128)

the problem is that header is created:
header = '%-40s %-10s\n%-40s %-10s' % (
                _('List'), _('Password // URL'), '----', '--------')

but for example Password in Polish contains non-ascii characters so 
this patch is needed:

 # Coerce everything to Unicode
+header = tounicode(header, enc)
 text = tounicode(text, enc)
 table = [tounicode(_t, enc) for _t in table]

This fixes problem for me.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=300103&aid=984682&group_id=103



More information about the Mailman-coders mailing list