When downloading documents synchronously using the HTML5 edition, you might encounter the following error
Failed to set request character encoding: [x-user-defined]
Synchronous downloads require that the browser doesn't parse the returned data. Therefore, we override the MIME type using a user-defined character set forcing the browser to treat the returned data as plain text to let the bytes pass through unprocessed.
Some server-side libraries or scripts might have trouble understanding the charset x-user-defined. When this happens, you get the above error.
- Download asynchronously. Asynchronous downloads using the HTML5 edition treats the binary data as "blob", so there is no problem.
- Update your server-side library or related scripts to support the charset x-user-defined.