• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Inserting Special Characters into a String
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Inserting Special Characters into a String
      • From: Ian was here <email@hidden>
References: 
 >Inserting Special Characters into a String (From: Ian was here <email@hidden>)

  • Prev by Date: Re: Why does this leak memory?
  • Next by Date: Re: SOAP Handler question
  • Previous by thread: Inserting Special Characters into a String
  • Next by thread: Re: Inserting Special Characters into a String
  • Index(es):
    • Date
    • Thread