From a0c50d3edb7762a34d96e9d54f42c81985569b26 Mon Sep 17 00:00:00 2001 From: walzer Date: Wed, 19 Jan 2011 16:26:55 +0800 Subject: [PATCH] [iphone] support UTF8 Chinese chars --- cocos2dx/platform/iphone/CCXBitmapDC.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos2dx/platform/iphone/CCXBitmapDC.mm b/cocos2dx/platform/iphone/CCXBitmapDC.mm index 648dd9fd47..effaf1d3f2 100644 --- a/cocos2dx/platform/iphone/CCXBitmapDC.mm +++ b/cocos2dx/platform/iphone/CCXBitmapDC.mm @@ -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]];