[iphone] support UTF8 Chinese chars

This commit is contained in:
walzer 2011-01-19 16:26:55 +08:00
parent 14a5470d72
commit a0c50d3edb
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ static void initWithString(const char *content, const char *fontName, float size
}
alignment = UITextAlignmentCenter;
string = [[NSString alloc] initWithCString:content];
string = [[NSString alloc] initWithUTF8String:content];
name = @"Thonburi";
dimensions = [string sizeWithFont:[UIFont fontWithName:name size:size]];