Page 1 of 1

IA 16 Adding a special character when Write into Text File

Posted: Wed Jul 17, 2013 6:26 am
by samira
I'm using Installaware 16.
When trying to use Write into Text file and write into a .bat file sth like sc start servername after the installation and trying to run the batch file from command-line I get this error: ´╗┐' is not recognized. Opening the file from notepad it doesn't show the character but it is there and I cannot run my batch files at the end .

Re: IA 16 Adding a special character when Write into Text Fi

Posted: Wed Jul 17, 2013 11:43 am
by FrancescoT
Dear Samira,

I may suggest a work around ... currently.

Just add an empty string at the very beginning of your bat file, using the predefined $NEWLINE$ variable with the "Write to Text file" command.

Regards

Re: IA 16 Adding a special character when Write into Text Fi

Posted: Thu Jul 18, 2013 2:36 am
by samira
Thanks that solves the problem for now.

Re: IA 16 Adding a special character when Write into Text Fi

Posted: Thu Jul 18, 2013 8:51 am
by FrancescoT
:D

Re: IA 16 Adding a special character when Write into Text Fi

Posted: Fri Oct 31, 2014 3:39 pm
by jtoledano
I am having the same issue reported by others since moving to IA 18 using Write to Text File. Using this command inserts several extra characters at the beginning of the file that renders it unusable by my installed app. These characters are not seen in Notepad ++ but I can seem them when I view the binary structure. These codes are not there after I edit the file correctly, manually. I used the exact same command in previous versions of IA, with no issues.

I have tried some of the workarounds mentioned in other threads, but no luck. Or maybe I am not implementing these workarounds correctly. I tried adding an empty string before using Write to Text File before my Write to Text File line, also $NEWFILE$.

Please send more suggestions. :?

Re: IA 16 Adding a special character when Write into Text Fi

Posted: Mon Nov 03, 2014 2:50 pm
by FrancescoT
Dear Jtoledano,

the Write To Text File Command generates an UTF-8 text file format, exactly has the standard notepad does.

The problem you are having it may depend on your application and if the same is able to handle that format correctly.

Regards

Re: IA 16 Adding a special character when Write into Text Fi

Posted: Tue Nov 04, 2014 6:25 am
by jtoledano
After further research, it does seem that the error is due the latest release of IA 18. These extra characters that are being inserted are BOM related and documented in the post: viewtopic.php?f=2&t=9787. As I mentioned, these were not there in the previous version. If I do a byte dump and look at the Hexidecimal of the these three characters created after using the Write to Text File command, they are indeed the BOM and can not be seen using standard notepad or notepad ++. So related to the BOM thread, it would be good to add the option to the Write to Text File command to not include the BOM.

But I think I understand what you are saying, because IA 18 is now writing BOM using the Write to Text File command, I may need to make changes to my app to accept these characters.

Thanks,

Re: IA 16 Adding a special character when Write into Text Fi

Posted: Tue Nov 04, 2014 12:55 pm
by FrancescoT
In fact, this is exactly what I meant.

Regards