Re: (newbie question) Putting special characters in NSStrings
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