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

NSString to const char


  • Subject: NSString to const char
  • From: Micha Fuhrmann <email@hidden>
  • Date: Mon, 26 May 2008 15:47:04 +0200

Hi everyone,

in advance sorry for asking... must be very basic, however couldn't find anything suitable.

I need to pass a const char to a C++ function from an NSString. However the argument I pass end up as garbage and that's it. Here an example to illustrate:

NSString* theNsstring = @"étape";

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



In the console theConstString ends up as "\xe9".

Any help very much appreciated

Michael_______________________________________________

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


  • Follow-Ups:
    • Re: NSString to const char
      • From: Steve Christensen <email@hidden>
    • Re: NSString to const char
      • From: "Hamish Allan" <email@hidden>
  • Prev by Date: NSSavePanel: Saving with file extension
  • Next by Date: Re: tables
  • Previous by thread: Re: NSSavePanel: Saving with file extension
  • Next by thread: Re: NSString to const char
  • Index(es):
    • Date
    • Thread