Fix: EventSource’s response has a charset (“iso-8859-1”) that is not UTF-8. Aborting the connection.

The issue is with the mismatch charset. You have default charset charset : iso-8859-1 and you are trying to use content which have charset=UTF-8.

To fix the error you need to set the charset=UTF-8 in which you have set the header. In my case, I have fix the error by setting the charset=UTF-8 in header. Check below code for reference:

header( 'Content-Type: text/event-stream, charset=UTF-8' );

I have created the PR for this fix for WordPress Importer created by
humanmade

PR: https://github.com/humanmade/WordPress-Importer/pull/168

Advertisements