In python, if stdout is not a tty (e.g piped output), then the output encoding will fall back to the 'ascii' codec.
@@ -131,7 +131,7 @@ try:
print u' three strikes, you\'re out'
send_warning_email(isp, log)
- print log.rstrip()+'\n'
+ print log.rstrip().encode('utf-8')+'\n'
if exc:
print u'Unexpected exception in the validator: %r' % exc
print exc_log