Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
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
 
					
				
		
 flipside
		
			flipside
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
 
					
				
		
 jonathandienst
		
			jonathandienst
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
 
					
				
		
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:

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
		
			flipside
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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
		
			ashfaq_haseeb
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Check if this can help you
Regards
ASHFAQ
 
					
				
		
Thank you very much!
PurgeChar solved the problem.
Johannes
