Try
CFStringConvertEncodingToNSStringEncoding
and kCFStringEncodingBig5_E
.unichar ellipsis = 0x2026;
NSString *theString = [NSString stringWithFormat:@"To be continued%C", ellipsis];
// custom encoding
NSStringEncoding encoding = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingDOSChineseTrad);
NSData *asciiData = [theString dataUsingEncoding:encoding
allowLossyConversion:YES];
NSString *asciiString = [[NSString alloc] initWithData:asciiData
encoding:encoding];
_myLabel.text = asciiString;
No comments:
Post a Comment