Description
*What are the steps to reproduce your problem? *
1. Run Optimize on a server with a different platform encoding than UTF-8. (alternatively set the encoding system property -Dfile.encoding=ISO-8859-1 )
2. Deploy a definition xml encoded in UTF-8 with non ascii compatible UTF-8 characters
*What is the problem? *
3. The import of the xml will fail with an error such as:
17:08:19.246 [EngineImportScheduler-1] ERROR o.c.o.s.i.e.m.ProcessDefinitionXmlEngineImportMediator - Was not able to import next page, retrying after sleeping for 1500ms. org.camunda.bpm.model.xml.ModelParseException: SAXException while parsing input stream
What would be the expected behavior:
The XML should be parsed with UTF-8 encoding.
*Hints (optional): *
At least in https://github.com/camunda/camunda-optimize/blob/34e7c3b83791335db2793ba52f93bdab805a5151/backend/src/main/java/org/camunda/optimize/service/util/BpmnModelUtil.java#L42 the XML is read via a ByteArrayInputStream only causing it to be parsed with default platform encoding
By default all Optimize start scripts set the file encoding to be UTF-8 regardless of the environment, so in practice this issue cannot occur given the default scripts are used to run Optimize