Skip to main content

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.

@Chris Kuip, I face the same problem with a customer I want to circumvent the BOM character by changing the project setting, but I can’t select the option ‘UTF8NoBom’ from the list. (using aimms 24.3). Has the option been removed or do I miss something?


Hi Marc,

 

It looks like you are checking the option 'Default output character encoding’ instead of ‘Default output character set’.  Can you check?

 

With kind regards,

 

Chris

 


Yes, my mistake (it was hidden indeed). I found it now, thanks!


Reply


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

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