Forum Discussion

richie's avatar
richie
Community Hero
7 years ago

Weird Character Encoding on DataSource Data Log - Very Confused!

Hey!

 

Ok - I'm using fixed width flat files (no delimiters in file) as my datasource which I'm expecting to populate the fileContents property on the Datasource (directory type) as I've always done for other testing.

 

 

Datasource (directory) with fileContents property.  (points to a fixed width file on my drive)
REST (POST) step (sourcing file via ${DataSource#fileContents})

 

 

HOWEVER - when I run the datasource which populates the 'Data Log' section of the form - there's loads of these weird non-normal ASCII characters in the Data Log.

 

I'm totally at a loss - I've never seen anything like this before - within the Data Log section - it appears to be inserting a square character in between each ASCII alphanumeric char.

 

For example (using * to represent the square character) - the first 7 chars in the flat file = 'C1C36616'

 

Within the Data Log the value appears as 'ÿþC*1*C*3*6*6*1*6'

 

 

So - 2 weird characters appears BEFORE the first character in the file which is a 'C' and then each character in the file is separated by the square character.

 

Im assuming this is something to do with character encoding but I'm at a loss.

 

I've attached the fixed width flat file as well as a .png of the Datasource with the Data Log contents (displaying the contents of my fileContents property).

 

After seeing this, I did try saving the file as ISO-8859-1 (within notepad++) and specifying ISO-8859-1 as the 'Encoding' value within the Datasource - but that didn't change anything.

 

 

I welcome all/any help anyone can provide - I'm just at a loss here - this weird char encoding occurs even before the REST POST request, but I can't see any yoptions to alter the char encoding to get this to work.

 

I'm stuck using fixed width flat files as the files are from a legacy system we still need to interact with.

 

Cheers!

 

richie

No RepliesBe the first to reply