handle cases where the exception is not encoded as UTF-8