Specific File Type and Encoding

Specific File Type and Encoding


Hi Everyone,

This is a very specific problem so i'm just looking for some pointers here.

Basically i have to run a process which, after running, generates a file which has to be with UTF-8 BOM Encoding. This is a closed prerequisite, the Byte Order Mark has to be present.

Well i created an extension which runs the process, and i've tried the following:

1 - Outputting a string, calling TextToBinary and using Download Widget (Outputs utf-8 no BOM)

2 - Outputting binary array and using Download widget (Outputs utf-8 no BOM)

3 - and finally what i'm trying now is creating the file directly in the extension (.net using binaryWriter) outputting to a file and doing nothing on the Outsystems end afterwards. This i'm having no luck because either i don't have permissions to access the folder where i want to save the file OR maybe the extension just can't get there. 

It's probably worth it to say that i'm doing this in my personal cloud of Outsystems 10, however it is to be integrated on a production environment.

If anyone can help with some insights, maybe someone has had similar problems, or maybe limitations that i may not be aware of, i would greatly appreciate some help on this subject.

Best Regards,

Bruno Gonçalves


Hi Bruno,

You could use the Binary Concat Forge component, and concatenate the BOM to the rest of the file.


Thank you Kilian! 

Managed to inject the bom in the way described and it is recognized as UTF-8 BOM.

For further information, the string used for the BOM is as follows: ""

if you insert that string in the TextToBinary, it becomes the bom, which you can concatenate to the rest of your binary content.

Thank you again and Best Regards,

Bruno Gonçalves

Great you got it solved! Happy coding :)