Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Cryptic characters while reading from file

Hello,

I want to read data from a file. To do so I use the following line in my load script:

date#(@1, 'DD.MM.YYYY') AS dateField

The first field in file (it's a QlikView logfile) is a date.

After script execution the table has been filled with values but the dateField begins with two cryptic chars, looking like 'yb'.

Does anyone know about such a behaviour and how to fix it?

Thank you!

Johannes

1 Solution

Accepted Solutions
Highlighted
Specialist II
Specialist II

It sounds like the file is UTF-16 encoded ...

https: //en.wikipedia.org/wiki/Byte_order_mark#UTF-16

You might be able to purgechar them.

flipside

View solution in original post

5 Replies
Highlighted

Hi

your statement looks OK, so I suggest that you post the first couple of lines of the log file, as well as the exact output you get.

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Highlighted
Not applicable

These are the first lines of the log:

12.10.2014 23:00:01:  Execution started.
12.10.2014 23:00:01:  QlikView Version:
12.10.2014 23:00:01:  CPU Target               
12.10.2014 23:00:01:  Operating System         

This is what I get in the preview of the first table the values are stored in:

Dialog_2014-10-13_13-45-36.png

The weird thing is, if I modify the log file and insert an empty row before the first row the preview is fine.

Johannes

Highlighted
Specialist II
Specialist II

It sounds like the file is UTF-16 encoded ...

https: //en.wikipedia.org/wiki/Byte_order_mark#UTF-16

You might be able to purgechar them.

flipside

View solution in original post

Highlighted

Hi,

Check if this can help you

Regards

ASHFAQ

Highlighted
Not applicable

Thank you very much!

PurgeChar solved the problem.

Johannes