Re: Checking for line ending types
Re: Checking for line ending types
- Subject: Re: Checking for line ending types
- From: Fritz Anderson <email@hidden>
- Date: Sun, 28 Nov 2004 20:49:26 -0600
I would expect a text file saved by AppleWorks to use '\r' as the line
delimiter.
-- F
On 28 Nov 2004, at 8:22 PM, Mike S wrote:
I'm running into a similar problem using
NSString * contents = [NSString
stringWithContentsOfFile:newPath];
NSArray * contentsArray = [contents
componentsSeparatedByString:@"\n"];
with a file that is a concatenation of pieces of files
from a noaa FTP site. Files were downloaded to a
windows machine then copied to a mac, then pieces
pulled out and concatenated using Appleworks and
saving the resulting file as a text file from
Appleworks.
the NSString method reads the file in fine and can
print it back out verbatim, however the resulting
NSArray has only a single entry that is the entire
file, rather than the 100+ entries I expected for the
100+ lines in the file. Should I be looking for a
"\r" as an end of line character?
--
Fritz Anderson
Consulting Programmer Chicago, Illinois
http://resume.manoverboard.org/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden