• 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: printf with "%@"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: printf with "%@"


  • Subject: Re: printf with "%@"
  • From: Deborah Goldsmith <email@hidden>
  • Date: Fri, 11 Aug 2006 14:41:19 -0700

If the output is aimed at Terminal then you should always use UTF8String, not cStringUsingEncoding:

Deborah Goldsmith
Internationalization, Unicode liaison
Apple Computer, Inc.
email@hidden

On Aug 11, 2006, at 9:47 AM, Dirk Stegemann wrote:

So, 1) replacing "NSLog" by "printf", 2) replacing "%@" by "%s" and 3) passing the const char* obtained through sending "cStringUsingEncoding:" (or "UTF8String:" as Greg pointed out) to the description NSString of the object in question should simulate NSLog's behaviour pretty well.

_______________________________________________ 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
References: 
 >printf with "%@" (From: Roland Silver <email@hidden>)
 >Re: printf with "%@" (From: Dirk Stegemann <email@hidden>)
 >Re: printf with "%@" (From: Roland Silver <email@hidden>)
 >Re: printf with "%@" (From: Dirk Stegemann <email@hidden>)
 >Re: printf with "%@" (From: Roland Silver <email@hidden>)
 >Re: printf with "%@" (From: Dirk Stegemann <email@hidden>)

  • Prev by Date: Re: From Big Endian to Little Endian
  • Next by Date: Re: "Invalid colorspace type" console error
  • Previous by thread: Re: printf with "%@"
  • Next by thread: Re: printf with "%@"
  • Index(es):
    • Date
    • Thread