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: Brian Bergstrand <email@hidden>
- Date: Wed, 22 Dec 2004 08:12:47 -0600
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Nestor,
To print any non-ASCII text from code, you should use the UNICODE hex
value:
E.G.
I'm not sure what the value is for the character you are trying to
print, but if I wanted to print a filled star and an empty star, I'd do
the following:
// Std. "code written in mail" disclaimer applies.
[theNSTextField setStringValue:[NSString stringWIthFormat:@"%C%C",
0x2605, 0x2606]];
%C is for unicode characters, while the std. %c is for ascii chars.
HTH.
However, the ideal solution here would be to store your string in a
localized Strings file in your bundle resources, then you can use the
following, to have it auto-selected for the user's selected language:
NSLocalizedString(@"This is my ascii string", "ascii string"));
HTH.
On Dec 22, 2004, at 6:17 AM, Nestor Cardozo wrote:
> I am trying to write programatically a combination of greek and latin
> characters to an NSTextField:
>
> [theNSTextField setStringValue:@"σxx"]
>
> it looks okay in Xcode. However, when I run the program the character
> that actually shows up is:
>
> æĚxx
>
> the greek letter sigma σ has been replaced for æĚ
>
> How to write greek characters to an NSTextField?
>
Brian Bergstrand <http://www.bergstrand.org/brian/>, AIM: triryche206
PGP Key: <http://www.bergstrand.org/brian/misc/public_key.txt>
S*** happens. Then it happens again.
As of 08:03:54 AM, iTunes is playing "Orestes" from "Mer de Noms" by "A
Perfect Circle"
-----BEGIN PGP SIGNATURE-----
Version: PGP 8.1
iQA/AwUBQcly2XnR2Fu2x7aiEQKcPgCbB/KmFgZFW687UqGf81SlbQ01b0sAoMD0
bGT0o5GBPoksO0QP9i7fPMXg
=aweX
-----END PGP SIGNATURE-----
_______________________________________________
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