Re: how to write programatically greek letters to an NSTextField?
Re: how to write programatically greek letters to an NSTextField?
- Subject: Re: how to write programatically greek letters to an NSTextField?
- From: The Karl Adam <email@hidden>
- Date: Thu, 23 Dec 2004 01:08:18 -0500
Umm... [NSString stringWithUTF8String:"σxx"] works fine, no need to
escape any values with it at all. At least not Unicode values anyway.
-Karl
On Wed, 22 Dec 2004 15:17:00 -0500, Clark Cox <email@hidden> wrote:
> On Wed, 22 Dec 2004 13:17:00 +0100, Nestor Cardozo <email@hidden> wrote:
> > I am trying to write programatically a combination of greek and latin
> > characters to an NSTextField:
> >
> > [theNSTextField setStringValue:@"σxx"]
>
> One cannot use non-ASCII characters in @"foo" string literals. You
> have several options:
> 1) Use NSLocalizedString to load your Unicode string from a .strings file
> 2) Explicitly use character values in the source code:
> NSString *myString = [NSString stringWithUTF8String: "\xCF\x83xx"];
>
> or:
>
> const unichar myCharacters[] = {0x03C3,'x','x'};
> NSString *myString = [NSString stringWithCharacters: myCharacters
> length: sizeof myCharacters / sizeof *myCharacters];
>
> or:
>
> NSString *myString = [NSString stringWithFormat: @"%Cxx", 0x03C3];
>
>
> --
> 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
>
_______________________________________________
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