• 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: NUL characters in NSString cause unexpected results
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NUL characters in NSString cause unexpected results


  • Subject: Re: NUL characters in NSString cause unexpected results
  • From: Rosyna <email@hidden>
  • Date: Thu, 23 Nov 2006 12:58:09 -0700

I took it to mean the latter since it says bytes and there's CFStringCreateWithCString which does care about NULL.

Ack, at 11/23/06, Scott Stevenson said:

On Nov 22, 2006, at 11:09 PM, Rosyna wrote:

That's odd since it just calls CFStringCreateWithBytes() and CFStringCreateWithBytes() has no such note. Bizarre.

Perhaps it's a bit ambiguous, but:

"This function creates an immutable CFString object from a "raw" byte buffer-that is,
a buffer containing 8-bit characters but no length byte (as in Pascal buffers) and no
terminating NULL character (as in C buffers)"


<http://developer.apple.com/documentation/CoreFoundation/Reference/CFStringRef/Reference/reference.html>

I guess you could take that to mean "no NULLs" (more likely) or "the NULL doesn't mean the end."

--


Sincerely, Rosyna Keller Technical Support/Carbon troll/Always needs a hug

Unsanity: Unsane Tools for Insanely Great People

It's either this, or imagining Phil Schiller in a thong.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NUL characters in NSString cause unexpected results
      • From: Steve Christensen <email@hidden>
References: 
 >NUL characters in NSString cause unexpected results (From: Jerry Krinock <email@hidden>)
 >Re: NUL characters in NSString cause unexpected results (From: Scott Stevenson <email@hidden>)
 >Re: NUL characters in NSString cause unexpected results (From: Rosyna <email@hidden>)
 >Re: NUL characters in NSString cause unexpected results (From: Scott Stevenson <email@hidden>)

  • Prev by Date: NSProgressIndicator drawing
  • Next by Date: Re: NSProgressIndicator drawing
  • Previous by thread: Re: NUL characters in NSString cause unexpected results
  • Next by thread: Re: NUL characters in NSString cause unexpected results
  • Index(es):
    • Date
    • Thread