coolOrangeLabs / powerGateTemplate

powerGate full functional sample ERP integration
MIT License
3 stars 3 forks source link

Validate XML Config with UTF-8-BOM Encoding #199

Closed PatrickGrub closed 2 years ago

PatrickGrub commented 2 years ago

We have experienced a lot of problems when Importing an XML Config which is not UTF-8-BOM:

In order to force everybody to use UTF-8-BOM:

TollJulian commented 2 years ago

Unfortunately I found no way to load a XML file with Byte Order Mark from Vault Options, so the export from Vault Options will fail. I've tried loading with:

direct conversion: $xml = xml$xmlString In any way it throws the Error "Invalid Data at the Root level"

the only way to use a file with BOM encoding is to remove the Byte Order Mark before the import (for UTF-8-BOM remove the first 3 bytes), but this would convert the file back to UTF-8

I suggest to work with UTF-8 and avoid any special character in the config file