This code:

NSString *key = @"กุญแจ";
NSString *value = @"คุณค่า";
NSArray *array = @[ key, value ];
NSLog(@" Two nice strings: %@ %@", key, value);
NSLog(@" Bad Array: %@", array);

prints:

2012-...]  Two nice strings: กุญแจ คุณค่า
2012-...]  Bad Array: (
    "\U0e01\U0e38\U0e0d\U0e41\U0e08",
    "\U0e04\U0e38\U0e13\U0e04\U0e48\U0e32"
)

Bug or feature?
Is there a way to make the array print in a more readable way?
10.8.2, Xcode 4.5.2

Gerriet.

P.S. Same problem with dictionaries.

P.P.S
NSLog(@" Bad Array3: %s", [[array description] UTF8String]); has exactly the 
same unreadable output.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to