I i.yalovecky macrumors member Original poster May 31, 2010 #1 I have unicode code of symbol, for example 2605, how i can display it in NSTextField, thanks.
robbieduncan Moderator emeritus May 31, 2010 #2 Something like this will get you an NSString. You should be able to do the rest (if you can't read the documentation): Code: unichar ch = 0x2605; NSString*str = [NSString stringWithCharacters:&ch length:1];
Something like this will get you an NSString. You should be able to do the rest (if you can't read the documentation): Code: unichar ch = 0x2605; NSString*str = [NSString stringWithCharacters:&ch length:1];
J jamawa macrumors newbie May 31, 2010 #3 Another option is: Code: [theTextField setStringValue:[NSString stringWithFormat:@"Twinkle, twinkle, little %C", 0x2605]];
Another option is: Code: [theTextField setStringValue:[NSString stringWithFormat:@"Twinkle, twinkle, little %C", 0x2605]];
K kainjow Moderator emeritus May 31, 2010 #4 Or use \u - for example this Code: @"Print\u2026" will give Code: @"Print "
robbieduncan Moderator emeritus Jun 1, 2010 #5 The reason I used the solution I did is that some of the above depend on the source code file being UTF-8 and will break if it is not. Lot's of good discussion here.
The reason I used the solution I did is that some of the above depend on the source code file being UTF-8 and will break if it is not. Lot's of good discussion here.