Handle non-ascii data in logged exceptions like in the main message.

Closes #675