diff options
author | tkikuchi <> | 2005-01-17 23:57:07 +0000 |
---|---|---|
committer | tkikuchi <> | 2005-01-17 23:57:07 +0000 |
commit | 5101fa667c90ac3dc327b57989ae99a98011709d (patch) | |
tree | fcac915f393a8132b4a5214675972bb45bd76b4e /Mailman | |
parent | e5f53847c47427402f28109dba2b423c754428bc (diff) | |
download | mailman2-5101fa667c90ac3dc327b57989ae99a98011709d.tar.gz mailman2-5101fa667c90ac3dc327b57989ae99a98011709d.tar.xz mailman2-5101fa667c90ac3dc327b57989ae99a98011709d.zip |
Fix for bug#1090439: 8bit characters are allowed if user language is set
properly. If the language charset is set as 'us-ascii' then the 8bit chars
are printed in '?'.
Diffstat (limited to 'Mailman')
-rw-r--r-- | Mailman/Deliverer.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Mailman/Deliverer.py b/Mailman/Deliverer.py index 49a88a1b..f1a0db58 100644 --- a/Mailman/Deliverer.py +++ b/Mailman/Deliverer.py @@ -112,19 +112,27 @@ your membership administrative address, %(addr)s.''')) cpuser = self.getMemberCPAddress(user) recipient = self.GetMemberAdminEmail(cpuser) subject = _('%(listfullname)s mailing list reminder') + # Get user's language and charset + lang = self.getMemberLanguage(user) + cset = Utils.GetCharSet(lang) + password = self.getMemberPassword(user) + # TK: Make unprintables to ? + # The list owner should allow users to set language options if they + # want to use non-us-ascii characters in password and send it back. + password = unicode(password, cset, 'replace').encode(cset, 'replace') # get the text from the template text = Utils.maketext( 'userpass.txt', {'user' : cpuser, 'listname' : self.real_name, 'fqdn_lname' : self.GetListEmail(), - 'password' : self.getMemberPassword(user), + 'password' : password, 'options_url': self.GetOptionsURL(user, absolute=True), 'requestaddr': requestaddr, 'owneraddr' : self.GetOwnerEmail(), - }, lang=self.getMemberLanguage(user), mlist=self) + }, lang=lang, mlist=self) msg = Message.UserNotification(recipient, adminaddr, subject, text, - self.getMemberLanguage(user)) + lang) msg['X-No-Archive'] = 'yes' msg.send(self, verp=mm_cfg.VERP_PERSONALIZED_DELIVERIES) |