Re: Who broke NSLog on Leopard ?
Re: Who broke NSLog on Leopard ?
- Subject: Re: Who broke NSLog on Leopard ?
- From: John Stiles <email@hidden>
- Date: Fri, 25 Jan 2008 12:00:04 -0800
You could probably do
printf("%s", xml);
That has the added benefit of not leaking an NSString object.
David Burnett wrote:
Hi,
while developing on Tiger I was using the following code to debug thee
xml my app was creating.
NSLog(@"%@",
[[NSString alloc] initWithData:xml
encoding:NSUTF8StringEncoding]);
This worked fine, and I left in it as a useful debugging aid, as I
could ask users to copy the XML from the system log and it was nice
formatted. could just copy and paste it, and load it back into my
application.
Now I'm on Leopard I get stuff like.....
<color index="0" rgb="119 41 39"/>\n <color index="1" rgb="129 51
39"/>\n <color index="2" rgb="135 57 39"/>\n <color index="3"
rgb="144 63 39"/>\n
Notice the \n, its not me of showing the line feeds, I'm actually
getting the characters "\" and "n" in the syslog.
Is there anyway to get the old behaviour back ?
Dave
_______________________________________________
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
_______________________________________________
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