• 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: (newbie question) Putting special characters in NSStrings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (newbie question) Putting special characters in NSStrings


  • Subject: Re: (newbie question) Putting special characters in NSStrings
  • From: Clark Cox <email@hidden>
  • Date: Mon, 21 Mar 2005 14:42:28 -0500

On Mon, 21 Mar 2005 11:18:57 -0500, Sean McBride
<email@hidden> wrote:
> On 2005-03-21 10:45, Clark Cox said:
>
> >> So is it correct to say that using @"±§£€" is (linguistically) valid Obj-
> >> C but just not supported by gcc?
> >
> >No, as in Apple's Objective-C documentation, the @"" construct can
> >only take ASCII characters.
>
> OK, thanks.  Yet, both gcc and CW allow it to compile, without warning,
> when it contains invalid characters. :(
>
> But anyway, I wonder, why is it not allowed?  It sounds like some kind of
> archaic holdover. especially since, as you say, you can do this:
>
> [NSString stringWithUTF8String: "±§£€"];

This is because, for efficiency, the actual object generated by the
compiler when it encounters @"..." is really just a wrapper around a
simple, constant C-string.

--
Clark S. Cox III
email@hidden
http://www.livejournal.com/users/clarkcox3/
http://homepage.mac.com/clarkcox3/
 _______________________________________________
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

References: 
 >Re: (newbie question) Putting special characters in NSStrings (From: Clark Cox <email@hidden>)
 >Re: (newbie question) Putting special characters in NSStrings (From: "Sean McBride" <email@hidden>)

  • Prev by Date: Re: Tools for creating icons
  • Next by Date: Passing data between Applescript and ObjC
  • Previous by thread: Re: (newbie question) Putting special characters in NSStrings
  • Next by thread: leak in NSInvocation when NOT using zero link ?
  • Index(es):
    • Date
    • Thread