Re: NSString really Unicode?
Re: NSString really Unicode?
- Subject: Re: NSString really Unicode?
- From: Allan Odgaard <email@hidden>
- Date: Fri, 12 Mar 2004 07:20:01 +0100
On 12. Mar 2004, at 4:45, James J. Merkel wrote:
Except, which encoding should be used? I have tried several, and
intvalue doesn't seem to work with any of them.
int main (int argc, char const* argv[])
{
[NSAutoreleasePool new];
char data[] = { 0, '1', 0, '2', 0, '3' };
printf("%d\n", [[NSString stringWithCharacters:(unichar*)data
length:3] intValue]);
return 0;
}
This program prints "123", so the method works -- show us your code,
and we might be able to help you out.
Please also include the first few lines of the data file as a hexdump,
e.g. from a terminal write: "hexdump -C <file> | head -5"
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.