Encode the unicode form of the error not the error itself.

Fixes #4