Skip to main content

Has anyone had an issue when writing to text file, it prefixes each entry with a 'space' character?

It is writing each new line nicely, appending to the existing data, but the data it writes always is inserted with a leading space.

I can confirm the row being sent to be added to the text file does not have any leading space:

When this is written, a space is appearing!

Where do the source text lines come from?

Didn't the AttributeTrimmer work to trim the space character?


Where do the source text lines come from?

Didn't the AttributeTrimmer work to trim the space character?

yes it does trim the character, I can see the attribute does not have a leading space right before being inserted to the text writer (as per above screenshot).

source is an attribute manager where I build that string, right before inserting into the text writer.

Note I have just tried using a CSV writer and it works perfectly fine, so that tells me the string being inserted is fine, it is the text file writer appending the leading space.

I no longer need an answer to solve this projects issue, but now I am just curious as to why it added the space in the first place.


Reply