My perltidy build succeeded (I think), but the state is "failed" and there's a backtrace in the "Result" section, which I guess is triggered by the "ä" in my surname: http://koji.fedoraproject.org/koji/taskinfo?taskID=3265 Result Traceback (most recent call last): File "/usr/sbin/kojid", line 1109, in runTask response = (handler.run(),) File "/usr/sbin/kojid", line 1185, in run return self.handler(*self.params,**self.opts) File "/usr/sbin/kojid", line 2128, in handler server.sendmail(from_addr, recipients, message) File "/usr/lib64/python2.4/smtplib.py", line 696, in sendmail (code,resp) = self.data(msg) File "/usr/lib64/python2.4/smtplib.py", line 493, in data self.send(q) File "/usr/lib64/python2.4/smtplib.py", line 320, in send self.sock.sendall(str) File "<string>", line 1, in sendall UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 588: ordinal not in range(128)
Mike B, thoughts?
Same for me.
We should surely be assuming utf-8 everywhere -- in Content-Type: of all text/plain parts, and by RFC2047-encoding the headers.
All the data in the database is stored as UTF-8, but comes back from the database as Python Unicode objects if it contains any non-ASCII characters, and smtplib apparently doesn't know how to handle Unicode. I just checked in a change to convert the Unicode to UTF-8-encoded str objects, which should resolve the problem. There will be an update to Koji soon to deploy this fix in production. There should be no non-ASCII characters in the email headers, so RFC2047 shouldn't be an issue.
I wonder if we should be using the email module...
I think this should be fixed now.