Open greg0ire opened 2 years ago
I've been able to workaround the issue by converting the file with iconv
:
iconv -f utf-8 -t utf-8 -c /tmp/my_dump_file.json > /tmp/clean_dump.json
iconv did not do the job for me.
This, did:
file_put_contents('dump.json', mb_convert_encoding(file_get_contents('dump.json'), "UTF-8", "UTF-8"));
Sometimes, this extension will generate on undecodable json file. Last time this happened to me, it was about a copyright character:
The error message from Symfony is copied from PHP, and the line number is not indicated. Fortunately, one can find lines with such characters like this:
grep -axv '.*' memdump-*
After replacing them, you end up with a usable file.
Hopefully this can be helpful to troubleshoot this instance of the issue:
You will note that
©
occurs here, that's because there is another occurrence of that character in the file, but for some reason it does not cause issues this time.@BitOne if you read this, I hope you're well :)