Re: Imbedding unicode in strings
Re: Imbedding unicode in strings
- Subject: Re: Imbedding unicode in strings
- From: "Clark Cox" <email@hidden>
- Date: Thu, 22 Jun 2006 10:48:36 -0400
On 6/21/06, Shaun Wexler <email@hidden> wrote:
On Jun 21, 2006, at 11:39 AM, Craig Altenburg wrote:
> The "Text Edit" sample applications defines strings with imbedded
> unicode characters:
>
> NSLocalizedString( @"Couldn\\U2019t open some of the specified
> files.", nil );
>
> This works -- the string displays with the "curly" apostrophe
> instead of the plain ASCII one.
>
> When I try the same thing in my program the "\U2019" is displayed.
>
> I looked at the compiler flags but don't see anything that they're
> doing that would account for the difference in behavior.
>
> Does anyone know what I need to do to get such strings recognized?
It only works in *C99 or C++, and you have one too many backslashes.
In Xcode, you'll find the build setting "C Language Dialect"...
Not quite the case here. In the TextEdit example, notice that there
are two backslashes, so the string literally contains the backslash
character followed by 'U' followed by '2', etc. This is not the C99
universal character that you are thinking of, it is a feature of
genstrings.
--
Shaun Wexler
MacFOH
http://www.macfoh.com
_______________________________________________
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
--
Clark S. Cox III
email@hidden
My CV/Resume:
http://homepage.mac.com/clarkcox3/files/Resume.pdf
http://homepage.mac.com/clarkcox3/files/Resume.html
_______________________________________________
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