I have a tab delimited text file which has text like the below (for simplicity let's assume its the only column in the file)....
POWER MAKER FOR SURE.\n\nGREAT THROTTLE RESPONSE
When I read this in, I want it to come through as...
POWER MAKER FOR SURE
GREAT THROTTLE RESPONSE
Here is the code where I read this with OpenCSV CSVReader...
csv = new CSVReader(new FileReader(opt.f),'\t' as char, '|' as char, '\0' as char)
while ((line = csv.readNext()) != null) {
println("Raw is ${line}")
Notice how I used a different constructor where the escape character has been changed as suggested in this post so that the '\' character is preserved.
But what is being printed is..
Raw is ["POWER MAKER FOR SURE.\n\nGREAT THROTTLE RESPONSE, BRRRAAAP!"]
Why is not interpreting the newline characters?