IA 16 Adding a special character when Write into Text File

Got a problem you cannot solve? Try here.
samira
Posts: 21
Joined: Mon Jan 28, 2008 6:48 am

IA 16 Adding a special character when Write into Text File

Postby samira » Wed Jul 17, 2013 6:26 am

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 .

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

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

Postby FrancescoT » Wed Jul 17, 2013 11:43 am

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
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

samira
Posts: 21
Joined: Mon Jan 28, 2008 6:48 am

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

Postby samira » Thu Jul 18, 2013 2:36 am

Thanks that solves the problem for now.

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

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

Postby FrancescoT » Thu Jul 18, 2013 8:51 am

:D
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

jtoledano
Posts: 33
Joined: Tue Jul 20, 2010 10:15 am

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

Postby jtoledano » Fri Oct 31, 2014 3:39 pm

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. :?

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

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

Postby FrancescoT » Mon Nov 03, 2014 2:50 pm

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
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

jtoledano
Posts: 33
Joined: Tue Jul 20, 2010 10:15 am

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

Postby jtoledano » Tue Nov 04, 2014 6:25 am

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,

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

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

Postby FrancescoT » Tue Nov 04, 2014 12:55 pm

In fact, this is exactly what I meant.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 79 guests