• 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: James Housley <email@hidden>
  • Date: Fri, 24 Nov 2006 07:12:53 -0500

On Nov 22, 2006, at 10:24 PM, Jerry Krinock wrote:

on 06/11/22 21:47, Chris Suter at email@hidden wrote:

However, getting back to the original issue, of course I would never put a
0x0 NUL in an NSString myself. But I discovered this issue when I was
testing today. My app reads in a supposed text file as data of unknown
string encoding. After doing a few tests to determine the encoding, it uses
the data to initialize an NSString. If some nasty person puts an ASCII 0x0
NUL in the file, it flows right through to my NSString and causes problems
later.



I found the exact same problem. Sometimes when pasting from some versions of Dreamweaver I would get a NULL terminating the string.


Jim

--

/"\   ASCII Ribbon Campaign  .
\ / - NO HTML/RTF in e-mail  .
 X  - NO Word docs in e-mail .
/ \ -----------------------------------------------------------------
email@hidden      http://www.FreeBSD.org     The Power to Serve
email@hidden  http://www.TheHousleys.net
---------------------------------------------------------------------
Do not meddle in the affairs of dragons, for you are crunchy and taste
    good with ketchup.



_______________________________________________

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


References: 
 >Re: NUL characters in NSString cause unexpected results (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: detecting the USB drives
  • Next by Date: Re: NSString, path and "/" char
  • 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