
Hi there,
Before new Mailman subversion will be released I'd like to clarify one think inside cron/mailpasswds script. Which in my opinion is buggy for all non unicode translations. Polish translation works perfect accept one think - monthy remainder is sended with wrong encoding. Do other of you notice this problem?
I think source of problem is in file cron/mailpasswds, lines 208-209:
# Coerce everything to Unicode text = tounicode(text, enc) table = [tounicode(_t, enc) for _t in table]
Which is done for every language, and every encoding. After than reminder text is given to Message.UserNotification class, where additional encoding magic is done.
I many other places where Message.UserNotification is used no extra encoding translations is made before(e.g. Mailman/Deliverer.py). So the question is: What for we "Coerce everything to Unicode"?
If I comment out this two lines in cron/mailpasswds, encoding problem disappers - polish reminders are emailed with proper iso-8859 & QP. So if there is not certain reason to "coerce everything", I propose to delete this two lines.
cheers BArtek

Bartosz Sawicki wrote:
Hi there,
Before new Mailman subversion will be released I'd like to clarify one think inside cron/mailpasswds script. Which in my opinion is buggy for all non unicode translations. Polish translation works perfect accept one think - monthy remainder is sended with wrong encoding. Do other of you notice this problem?
Yes, there was a bug report in SF and I believe I fixed it. See http://cvs.sourceforge.net/viewcvs.py/mailman/mailman/cron/mailpasswds
What for we "Coerce everything to Unicode"?
If I comment out this two lines in cron/mailpasswds, encoding problem disappers - polish reminders are emailed with proper iso-8859 & QP. So if there is not certain reason to "coerce everything", I propose to delete this two lines.
There may be chance that a user input his password in a different language so passwords should be once transformed unicode. Last code in 2.1.5 failed to reverse encode into list language. May be we should restrict passwords within ascii 7bit characters. ([\x21-\x7f])
Thanks anyway for your comment. I have just fixed a last (hopefully) small bug to 'replace' alien charcters. Hope you can check out the latest CVS and try if the bug went away.
Cheers,

Tokio Kikuchi wrote:
Yes, there was a bug report in SF and I believe I fixed it. See http://cvs.sourceforge.net/viewcvs.py/mailman/mailman/cron/mailpasswds
Thank you for explanation. Thats nice to hear that bug is already closed. :)
There may be chance that a user input his password in a different language so passwords should be once transformed unicode. Last code in 2.1.5 failed to reverse encode into list language. May be we should restrict passwords within ascii 7bit characters. ([\x21-\x7f])
I think that restriction to ASCII charset is good idea. In fact in Poland people are used to such limitation. Using many information systems we can read "password can _not_ contain polish letters". Of course unicode is the future, but at this moment I wouldn't used password with strange characters.
cheers BArtek
participants (2)
-
Bartosz Sawicki
-
Tokio Kikuchi