BOM or no BOM

  • 2 September 2022
  • 0 replies

Userlevel 5
Badge +7

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:

  1. Set the hidden AIMMS Project Setting "Default output character set” to UTF8NoBom.
  2. Use the function dex::ConvertFileToEncoding(inputFileinputEncodingouputFileoutputEncodingnoBOM) to convert a file.
  3. The .json files created using dex::WriteToFile(dataFilemappingNamepretty) are UTF8 files without a BOM.

0 replies

Be the first to reply!


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator