On Sat, Feb 7, 2009 at 10:27 AM, Steve Sisak <sgs-li...@codewell.com> wrote:
> At 9:46 AM -0800 2/7/09, Joar Wingfors wrote:
>>
>> On Feb 7, 2009, at 6:55 AM, Steve Sisak wrote:
>>>
>>> Umm, unless I'm totally missing something, what's wrong with fopen() and
>>> fgets(), possibly followed with [NSString stringWithCString] on each line?
>>
>> What's wrong is that they won't allow you to specify the text encoding to
>> use. The same thing is true for the *deprecated* method
>> "+stringWithCString:" by the way.
>
> The OP specified he was working with ASCII logfiles before the conversation
> went off into the weeds on text encodings:

If the file is truly ASCII, then use NSASCIIStringEncoding. In this
day and age, there is *never* a good reason to use +stringWithCString:
or -initWithCString:.

-- 
Clark S. Cox III
clarkc...@gmail.com
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to