I have had to force usage of JSON_INVALID_UTF8_IGNORE as part of $this->jsonOptions in order to deal with data possibly faulty data content to index.
Without this option, I was sometimes getting errors during indexation json_encode error: Malformed UTF-8 characters, possibly incorrectly encoded
I did it in algolia/algoliasearch-client-php/lib/RetryStrategy/ApiWrapper.php, line 71 (latest PHP client 4.33)
I believe this should myabe added as a default option or made optional somewhere.