Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Storing txt file to "UTF-8 without BOM"

Hello community,

I store one field from a resident table loaded from a qvd to a txt file (I've also tried csv).

This txt file is saved with the UTF-8 BOM encoding.

The problem I have with this is that the file contains paths to images that I automatically convert with IrfanView (through the command line). But IfranView throws an error: "Can't read file header" because of the first BOM bytes.

Do you know of a way to automatically remove the BOM or can I change the store option? I've tried a bom remover tool but it had no "silent option" which is not an option.

Thank you,

Thorsten

1 Solution

Accepted Solutions
7 Replies
jerrysvensson
Partner - Specialist II
Partner - Specialist II

Could this help?

You can do this in a separate vbs script after your reload.

How store txt in ANSI ?

Not applicable
Author

Jerry,

do I put this script in a module or in the script and how would I call it then? Load, Execute, Call?

jerrysvensson
Partner - Specialist II
Partner - Specialist II

Place the code in a vbsfile: For instance utftoansii.vbs

If you have Publisher I would set up an external program task that runs after your reload is finished.

Syntax : cscript.exe utftoansii.vbs

You could place it in QV also, open the macro dialog Ctrl-M and add the code.

Trigger the code in OnPostReload. You have start your reload with a batchjob though.

qv.exe /r app.qvw since Publisher doesn't run triggers.

Not applicable
Author

I need to process the txt file before the reload has finished. I'll try to find some tool that I can execute automatically.

Thanks.

Not applicable
Author

Not applicable
Author

Hi Thorsten,

Stupid question: I need an automated process that calls bomremover.exe from the QlikView script, but it requires the user to click Enter before it runs.

Is this how you run it?  I'm trying to find/remember how to send an <Enter> command, and coming up empty.

Not applicable
Author

Nevermind.  Found it.

This works for me:

EXECUTE cmd.exe /c "echo. | c:\Temp\bomremover c:\Temp *.csv";