Re: unicode text in the console
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