Recently one of our customers encountered a REST API that didn't accept Json UTF8 files starting with a Byte Order Mark (BOM). By default, the PUT files created by AIMMS are UTF8 files with a BOM at the start to mark these files as UTF8 files.
There are some ways to circumvent this issue:
- Set the hidden AIMMS Project Setting "Default output character set” to UTF8NoBom.
- Use the function dex::ConvertFileToEncoding(inputFile, inputEncoding, ouputFile, outputEncoding, noBOM) to convert a file.
- The .json files created using dex::WriteToFile(dataFile, mappingName, pretty) are UTF8 files without a BOM.