[Bug 1202395] [NEW] sync_members crashes for UTF-8 real name

Cedders 1202395 at bugs.launchpad.net
Wed Jul 17 23:21:10 CEST 2013


Public bug reported:

This was reported in on mailman-users <http://mail.python.org/pipermail
/mailman-users/2007-October/058689.html> and a fix suggested by Mark
Sapiro.

Steps to reproduce: 
1) Create a text file encoded in UTF-8 including a line such as
Cédríc <cedders at example.com>
2) Use a list test-list ensuring cedders at example.com is not already a member of test-list
3) run sync_members --no-change --welcome-msg=no --goodbye-msg=no --notifyadmin=no -f testutf8.txt test-list

Expected results:
address is added with 
Added  : Cédríc <cedders at example.com>

Actual results:
  File "/usr/sbin/sync_members", line 259, in main
    s = email.Utils.formataddr((name, addr)).encode(enc, 'replace')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)

Attached patch applies to 2.1 and 2.2 head.

Note that there is also a related issue with list_members -f, where safe() also encodes to 7-bit, resulting in 
C??dr??c <cedders at example.com>
This is on a Debian 6.0.7 system with a UTF-8 locale.

** Affects: mailman
     Importance: Undecided
         Status: New

** Patch added: "Remove encode method in 2 lines per MS's post"
   https://bugs.launchpad.net/bugs/1202395/+attachment/3740439/+files/mailman-sync-members-unicode.patch

-- 
You received this bug notification because you are a member of Mailman
Coders, which is subscribed to GNU Mailman.
https://bugs.launchpad.net/bugs/1202395

Title:
  sync_members crashes for UTF-8 real name

To manage notifications about this bug go to:
https://bugs.launchpad.net/mailman/+bug/1202395/+subscriptions


More information about the Mailman-coders mailing list