I read the CocoaBuilder thread to no avail. fgets won't work in my case because 
my text file contains special characters which fgets mangles.

BTW, my file is not large - less than 1K. And I know it's encoding - MacRoman. 
And I know the line endings "/n".

But what I don't know is which API to use to read non-ASCII lines of text one 
at a time from one file, and write them to another file after processing each 
one.

One would think Cocoa would have something like fgets but that works with any 
encoding.

Erg




________________________________
From: Matt Neuburg <[email protected]>
To: Erg Consultant <[email protected]>
Cc: [email protected]
Sent: Thursday, March 26, 2009 7:24:29 AM
Subject: Re: Reading one line at a time using NSFileHandle

On Wed, 25 Mar 2009 19:36:01 -0700 (PDT), Erg Consultant
<[email protected]> said:
>Is there a way to read one line of a text file at a time using NSFileHandle
(the way fgets does)?

Is it my imagination or did we not just have a big thread about this...?

<http://www.cocoabuilder.com/archive/message/cocoa/2009/2/2/229302>

m.
-- 
matt neuburg, phd = [email protected], <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.tidbits.com/matt/default.html#applescriptthings


      
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to