Problem export PDF

We have an active commercial license.
We have a problem with the diagram when using export PDF.
The html page where the diagram is created has ISO-8859-1 encoding.
The data that is put in the diagram comes from our server with the same ISO-8859-1 encoding.
In this case characters like à, è, é, ì, ò, ó, ù with accent produce export errors and the PDF file is not generated.
From what I have read the data exported to PDF needs to be in UTF-8 format.

We tried a solution by modifying in diagramWithEditor.js and adding the following line of code, in 5.0.3 version of the library, t.acceptCharset=“utf-8” to the submit mask that makes the request. It worked this way but it is not a viable solution, always having the possibility of update of the library.
We tested also the 6.0.0 version and the problem persists.

Is there a solution for these cases?