Fix UnicodeDecodeError when postgres is configured to give non-English errors