Problem reading tab delimited file

  • Thread starter iamreallynewhere
  • Start date
I

iamreallynewhere

I know how to read in a tab delimited file, but I am having problems
reading one without ignoring line breaks. The text I am trying to read
has line breaks in paragraphs that I would like to keep as one token.

Is there a way to read in a text file while ignoring actual line breaks
and using my own special character to break up the lines?
 
K

Kevin McMurtrie

I know how to read in a tab delimited file, but I am having problems
reading one without ignoring line breaks. The text I am trying to read
has line breaks in paragraphs that I would like to keep as one token.

Is there a way to read in a text file while ignoring actual line breaks
and using my own special character to break up the lines?

Yeah. When you see a tab, that's a delimiter. Otherwise, keep reading.
Hope that helps.
 
I

iamreallynewhere

Can I use a tab as the delimiter and something besides a carriage
return for the line break? I want a special character to equal a line
break instead of an actual line break.
 
?

.

I know how to read in a tab delimited file, but I am having problems
reading one without ignoring line breaks. The text I am trying to read
has line breaks in paragraphs that I would like to keep as one token.

Is there a way to read in a text file while ignoring actual line breaks
and using my own special character to break up the lines?

You don't tell us how you are reading in from the file but I can guess:

Quit using readLine(). By definition it will read up to the first carriage
return or new line character. Write your own method.
 
I

iamreallynewhere

You are correct. I am using readLine and this is the first time it
hasn't fit my needs. What should I use?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top