In this function, I get the selected emoticon from NSTableView from the NSArrayController connected to an IBOutlet called emotes. The string in the selected NSArray contains UTF8 characters that is sent to the clipboard.
// Get Selected Emoticon
NSArray * selectedemote = [emotes selectedObjects];
NSLog(@"%@",[selectedemote valueForKey:@"emote"]);
// Send to Clipboard
[self copyToClipboard:[NSString stringWithFormat:@"%@",[selectedemote valueForKey:@"emote"]]];
The problem is with the NSArray itself. It seems to output the UTF8 string as a hexadecimal. Here is what the string looks like from the NSLog function:
2010-08-23 11:23:56.411 Emoticon[7919:a0f] (
"\\(\U2579\U30ee\U2579 )/"
)
Is there a possible way of converting the UTF-8 hex to a UTF-8 characters? Thanks.