转汉字
我觉得没什么用,但是也记着吧,万一有用呢
#pragma mark - Unicode编码转汉字
- (NSString *)replaceUnicode:(NSString *)unicodeStr {
NSString *tempStr1 = [unicodeStr stringByReplacingOccurrencesOfString:@"\\u"withString:@"\\U"];
NSString *tempStr2 = [tempStr1 stringByReplacingOccurrencesOfString:@"\""withString:@"\\\""];
NSString *tempStr3 = [[@"\"" stringByAppendingString:tempStr2]stringByAppendingString:@"\""];
NSData *tempData = [tempStr3 dataUsingEncoding:NSUTF8StringEncoding];
NSString *resultStr = [NSPropertyListSerialization propertyListWithData:tempData options:NSPropertyListImmutable format:nil error: nil];
return [resultStr stringByReplacingOccurrencesOfString:@"\\r\\n"withString:@"\n"];
}