• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSString really Unicode?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: NSString really Unicode?
      • From: "James J. Merkel" <email@hidden>
References: 
 >NSString really Unicode? (From: "James J. Merkel" <email@hidden>)
 >Re: NSString really Unicode? (From: "M. Uli Kusterer" <email@hidden>)
 >Re: NSString really Unicode? (From: "James J. Merkel" <email@hidden>)

  • Prev by Date: Re: Odd binding issue
  • Next by Date: Re: Advice needed about a possible bug in NSMethodSignature or NSInvocation
  • Previous by thread: Re: NSString really Unicode?
  • Next by thread: Re: NSString really Unicode?
  • Index(es):
    • Date
    • Thread