Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Version 9 - What's new - Store INTO plain text file

Hello !

I've seen that on version 9 we can dump a table onto a plain text file.

Always wanted that mostly to check how the load process was.

But I noticed that there are weird characters on the beginning of the output file.

On the attached kit you can see the problem by running the load process and then checking the 'test122.txt' output file.

Thanks !

12 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

In the format-spec parameter.

STORE TEST INTO TEST122X.TXT (txt, oem, delimiter is '|');

What I didn't make clear in my last post was that oem/ansi do not produce the desired effect. The STORE doc does not show options beyond txt/qvd, but based on Adriano's example, the format spec can include all the parms used in a LOAD format-spec. For example, "delimiter" is accepted and affects the output. However, oem or ansi seem to have no effect as the ouptut always has the utf-8 BOM.

I'm hoping that someone who is experiencing the problem will contact support to work this through.

-Rob

Not applicable
Author

Hi!

Last week I run into that problem. Trying to store a txt-file with codepage = 1252 (ANSI).

Exemple:

store Data into Data.txt (txt, codepage is 1252, embedded labels, delimiter is '\t');


I needed to store the file in encoding = ANSI. When I loaded the file in to a SQL-database the result was not the expected. I then open the txt-file with NotePad and I saw that Encoding was UTF-8 not ANSI. I now store data in txt and then open it with Notepad and save it as Encoding = ANSI.

I use QV9.0 SR5. Have someone contacted support to work this through? Can you in SR6 store a txt-file with something else then UTF-8?

Regards
Kristofer

gussfish
Creator II
Creator II

This post gives a workaround and a long-term solution to this problem.

Background

I've just run into this problem, trying to output a text file for loading into a downstream system.  That system is rejecting the file because of that 3-character so-called UTF-8 BOM.  As others have discussed in prior posts, these characters aren't shown in the standard Windows GUI text tools e.g. Notepad.  They are displayed, though, by using TYPE at the Windows command line.

I contacted QlikView Support, but as far as they're concerned, it's working as intended.

Rob Wunderlich's hopeful hypothesis sadly fails: STORE's format-spec ignores character-encoding parameters.

Workaround
1. If you have the option and skill, write a program in an appropriate system-level programming language (e.g. C or PERL) that strips-out the 1st 3 characters, and invoke that program via the EXECUTE command in your QlikView script.  (Sadly, my environment doesn't let me readily install new executables (i.e. the stripping script) on our servers, so this isn't actually an option for me).

2. Otherwise, manually strip-out the characters using Notepad: open the file in Notepad; then Save As, selecting Encoding: ANSI in the Save As dialog.

Long Term Solution

Vote for my Idea at http://community.qlik.com/ideas/3071  'STORE to provide flexible character encoding options'.

Angus.