• 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: NSString to const char
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSString to const char


  • Subject: Re: NSString to const char
  • From: "Hamish Allan" <email@hidden>
  • Date: Mon, 26 May 2008 15:05:52 +0100

On Mon, May 26, 2008 at 2:47 PM, Micha Fuhrmann <email@hidden> wrote:

> I need to pass a const char to a C++ function from an NSString.

> const char* theConstString = [theNsstring
> cStringUsingEncoding:NSUnicodeStringEncoding];

Your C++ function probably isn't expecting Unicode characters. Have
you tried NSUTF8StringEncoding?

Hamish
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >NSString to const char (From: Micha Fuhrmann <email@hidden>)

  • Prev by Date: Re: tables
  • Next by Date: Re: No-frills print to label printer help please
  • Previous by thread: NSString to const char
  • Next by thread: Re: NSString to const char
  • Index(es):
    • Date
    • Thread