Re: Accessing 8-bit bytes from a file using Cocoa
Re: Accessing 8-bit bytes from a file using Cocoa
- Subject: Re: Accessing 8-bit bytes from a file using Cocoa
- From: Ondra Cada <email@hidden>
- Date: Mon, 1 May 2006 15:44:53 +0200
Phil,
On 1.5.2006, at 14:17, Phil Faber wrote:
At the moment, I'm using C coding:
(fread(&oneByte,1,1,fp1) [where oneByte is defined as a 'char']
..to read in each byte but:
(a) this only works for basic ASCII characters (for example, "A"
appears as ASCII 65) but not non-standard characters (for example,
"å" appears as ASCII -116 ... yes, MINUS 116)
Nope, it works quite well with any value. That's no Cocoa, but plain
C. Read on the signed/unsigned distinction :)
(b) I suspect that it is better to achieve this task with Cocoa
instead of C.
That I do concur with.
Can anyone please provide me with the most basic coding to achieve
this in Cocoa?
I have already. See NSFileHandle.
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
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