Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

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
flipside
Not applicable

Re: Cryptic characters while reading from file

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

5 Replies
jontydkpi
Not applicable

Re: Cryptic characters while reading from file

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
Not applicable

Re: Cryptic characters while reading from file

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

flipside
Not applicable

Re: Cryptic characters while reading from file

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

ashfaq_haseeb
Not applicable

Re: Cryptic characters while reading from file

Hi,

Check if this can help you

Regards

ASHFAQ

Not applicable

Re: Cryptic characters while reading from file

Thank you very much!

PurgeChar solved the problem.

Johannes