Nov 8th, 2011, 07:59 AM
escaping tabs and new lines when writing to a flat file
i have to write a job where i read data from the database and output it to a tab-delimted file.
I have two problems which i cannot find solution for:
1 - how can i escape the \t character (in case that character has been put in one of the string fields) >?
2 - how can i escape the \n character, in case that character has been put in one of the string fields?
i see that DelimitedLineAggragator (and tokenizer) can escape the delimited character,. that works if i can
the field i am outputting contains a tab (sequence of spaces), but it does not work if the field contains \t
I cannot somehow escape at all the \n character if it is present in one of the fields i m sending to output..
could anyone assist pls?