Re: RB cannot send an email if description has non-ascii characters

2015-11-18 Thread Christian Hammond
Hi Alexey,

We fixed some additional Unicode issues with e-mail in 2.0.20. Can you
upgrade and see if this still reproduces?

Christian

-- 
Christian Hammond - christ...@beanbaginc.com
Review Board - https://www.reviewboard.org
Beanbag, Inc. - https://www.beanbaginc.com

On Wed, Nov 18, 2015 at 2:50 PM, Alexey Neyman 
wrote:

> Hi,
>
> We've seen a number of cases where RB does not send an email if the text
> entered into the description field contains characters outside of ASCII
> range. For example, it happens a character U+2019, 'right single quotation
> mark' is substituted by some editors instead of plain apostrophe. RB
> displays such requests normally, but fails to send an email notification.
> In the server log, the following stacktrace is printed:
>
> Traceback (most recent call last):
>   File
> "/usr/lib/python2.6/site-packages/ReviewBoard-2.0.19-py2.6.egg/reviewboard/notifications/email.py",
> line 632, in send_review_mail
> message.send()
>   File
> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/core/mail/message.py",
> line 276, in send
> return self.get_connection(fail_silently).send_messages([self])
>   File
> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/core/mail/backends/smtp.py",
> line 94, in send_messages
> sent = self._send(message)
>   File
> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/core/mail/backends/smtp.py",
> line 110, in _send
> self.connection.sendmail(from_email, recipients, message.as_bytes())
>   File
> "/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/core/mail/message.py",
> line 138, in as_string
> return fp.getvalue()
>   File "/usr/lib64/python2.6/StringIO.py", line 270, in getvalue
> self.buf += ''.join(self.buflist)
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 748:
> ordinal not in range(128)
>
> (0xe2 is the first byte in the UTF-8 sequence for that U+2019 character:
> 0xe2 0x80 0x99). Why is RB trying to decode the text as ASCII?
>
> Regards,
> Alexey.
>
> --
> Supercharge your Review Board with Power Pack:
> https://www.reviewboard.org/powerpack/
> Want us to host Review Board for you? Check out RBCommons:
> https://rbcommons.com/
> Happy user? Let us know! https://www.reviewboard.org/users/
> ---
> You received this message because you are subscribed to the Google Groups
> "reviewboard" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to reviewboard+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RB cannot send an email if description has non-ascii characters

2015-11-18 Thread Alexey Neyman
Hi,

We've seen a number of cases where RB does not send an email if the text 
entered into the description field contains characters outside of ASCII 
range. For example, it happens a character U+2019, 'right single quotation 
mark' is substituted by some editors instead of plain apostrophe. RB 
displays such requests normally, but fails to send an email notification. 
In the server log, the following stacktrace is printed:

Traceback (most recent call last):
  File 
"/usr/lib/python2.6/site-packages/ReviewBoard-2.0.19-py2.6.egg/reviewboard/notifications/email.py",
 
line 632, in send_review_mail
message.send()
  File 
"/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/core/mail/message.py",
 
line 276, in send
return self.get_connection(fail_silently).send_messages([self])
  File 
"/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/core/mail/backends/smtp.py",
 
line 94, in send_messages
sent = self._send(message)
  File 
"/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/core/mail/backends/smtp.py",
 
line 110, in _send
self.connection.sendmail(from_email, recipients, message.as_bytes())
  File 
"/usr/lib/python2.6/site-packages/Django-1.6.11.1-py2.6.egg/django/core/mail/message.py",
 
line 138, in as_string
return fp.getvalue()
  File "/usr/lib64/python2.6/StringIO.py", line 270, in getvalue
self.buf += ''.join(self.buflist)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 748: 
ordinal not in range(128)

(0xe2 is the first byte in the UTF-8 sequence for that U+2019 character: 
0xe2 0x80 0x99). Why is RB trying to decode the text as ASCII?

Regards,
Alexey.

-- 
Supercharge your Review Board with Power Pack: 
https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: 
https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
--- 
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reviewboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.