Skip to content

Instantly share code, notes, and snippets.

@uranusjr
Created November 20, 2011 06:24
Show Gist options
  • Save uranusjr/1379881 to your computer and use it in GitHub Desktop.
Save uranusjr/1379881 to your computer and use it in GitHub Desktop.
Test of Unicode character output in NSLog
//
// main.m
// test
//
// Created by uranusjr on 20/11.
// Copyright 2011年 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface ObjectA : NSObject
@property (retain) id item;
@end
@implementation ObjectA
@synthesize item;
- (NSString *)description
{
return [NSString stringWithFormat:@"(%@)", [self item]];
}
@end
int main (int argc, const char * argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
ObjectA *obj = [[ObjectA alloc] init];
[obj setItem:@"8月"];
NSLog(@"%@", obj);
[pool drain];
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment