• 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: unicode text in the console
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unicode text in the console


  • Subject: Re: unicode text in the console
  • From: Andy Lee <email@hidden>
  • Date: Tue, 29 Dec 2009 15:35:38 -0500

On Tuesday, December 29, 2009, at 01:22PM, "Greg Guerin" <email@hidden> wrote:
>Matt Neuburg wrote:
>
>> Still following up on this... The offending strings are in a
>> dictionary. So,
>> if you ask a string to log itself to the console, you see the
>> string, but if
>> you ask a dictionary to log itself to the console, its string
>> values are
>> shown as above. Why?
>
>AFAIK, a string's description is itself, but a dictionary's
>description is an old-style plist (more or less).

This is confirmed by the docs for the respective classes.

As for the "why," I can only guess that whoever implemented NSDictionary simply used code that was already there for generating plists, and separately, whoever implemented NSString figured the most natural implementation of -description was to return self.  Since -description generally doesn't promise to return any particular thing, there's no requirement that the two implementations be consistent in the way Matt was asking about.

--Andy

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: unicode text in the console
  • Next by Date: Re: gdb: Symbolized Crash Report: One line spans multiple functions?
  • Previous by thread: Re: unicode text in the console
  • Next by thread: add system-wide custom build rules?
  • Index(es):
    • Date
    • Thread