UTF8 encoding in file extract without the BOM header

Avatar

Avatar

anasso83525035

Avatar

anasso83525035

anasso83525035

12-11-2020

Hello,

 

I'm having an issue with a csv file extraction. The need is to have it encoded in UTF8 but ACC adds the byte order mark at the begining of the file.

 

Any idea how to get simple UTF8 extraction or remove the BOM please ?

 

Thank you.

View Entire Topic

Avatar

Avatar

anasso83525035

Avatar

anasso83525035

anasso83525035

16-11-2020

Hello @Darren_Bowers 

 

Thanks for the answer, I have been trying to implement that, but still get the following error :

 

-53
sudo: a password is required

 

Can you please tell me if my CMD command is constructed correctly :

 

//instance.vars.fileToSend is the complete path to the file extracted in the activity before

var CMD = '"'+"sed -i '1s/\xEF\xBB\xBF//' "+instance.vars.fileToSend+'"'

logInfo('command remove bom ===>'+CMD);
var res =execCommand(CMD,true);

instance.vars.retour = res[0];

logInfo('Code retour commande : ' + res[0]);

logInfo('Résultat commande : ' + res[1]);

logInfo('Fin');

Thank you.