Re: Inserting Special Characters into a String
Re: Inserting Special Characters into a String
- Subject: Re: Inserting Special Characters into a String
- From: James Housley <email@hidden>
- Date: Mon, 11 Jul 2005 11:56:52 -0400
Ian was here wrote:
Does anyone know of a way of inserting non-ascii
characters into a string. I've tried several ways and
keep getting compiler warnings. An NSTextView handles
special characters nicely, but my attributed string
and character arrays don't.
char checkChar = '?';
char bulletChar = '•';
or
NSAttributedString *checkChar = [[[NSAttributedString
alloc]initWithString:@"?"];
NSAttributedString *bulletChar = [[[NSAttributedString
alloc] initWithString:@"•"] ;
This has been covered many times in the list, but here is the short answer.
1. With .strings file in your bundle -- not practical for only a few
special characters.
2. Using stringWithFormat: -- easy for special characters in a few places.
[NSString stringWithFormat"@%C something starting with a bullet", 2022]
Jim
--
/"\ ASCII Ribbon Campaign .
\ / - NO HTML/RTF in e-mail .
X - NO Word docs in e-mail .
/ \ -----------------------------------------------------------------
email@hidden http://www.FreeBSD.org The Power to Serve
email@hidden http://www.TheHousleys.net
---------------------------------------------------------------------
If a million people say a foolish thing, it is still a foolish thing.
-- Anatole France [Jacques Anatole Thibault] (1844-1924)
Attachment:
smime.p7s
Description: S/MIME Cryptographic 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