objective-c Unicode转中文
来源:互联网 发布:记账软件安全吗 编辑:程序博客网 时间:2024/05/16 18:21
- (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* returnStr = [NSPropertyListSerialization propertyListFromData:tempData
mutabilityOption:NSPropertyListImmutable
format:NULL
errorDescription:NULL];
return [returnStr stringByReplacingOccurrencesOfString:@"\\r\\n" withString:@"\n"];
}
NSString *tempStr1 = [unicodeStr stringByReplacingOccurrencesOfString:@"\\u" withString:@"\\U"];
NSString *tempStr2 = [tempStr1 stringByReplacingOccurrencesOfString:@"\"" withString:@"\\\""];
NSString *tempStr3 = [[@"\"" stringByAppendingString:tempStr2] stringByAppendingString:@"\""];
NSData *tempData = [tempStr3 dataUsingEncoding:NSUTF8StringEncoding];
NSString* returnStr = [NSPropertyListSerialization propertyListFromData:tempData
mutabilityOption:NSPropertyListImmutable
format:NULL
errorDescription:NULL];
return [returnStr stringByReplacingOccurrencesOfString:@"\\r\\n" withString:@"\n"];
}
- objective-c unicode转中文
- objective-c Unicode转中文
- objective-c Unicode转中文
- objective-c Unicode转中文
- objective-c Unicode转中文 重写NSLog
- Objective-C Unicode 转换成中文
- Objective-C Unicode 转换成中文
- c#unicode转中文
- Objective-c unicode 转换成中文c代码
- C++unicode中文显示
- objective-c 中文转utf-8字符串
- objective-c中文教程
- objective-c中文教程
- C#中文转Unicode、Unicode转中文
- c/c++ 中文字符串转Unicode和UTF8
- JAVA UNICODE转中文
- 中文 转 unicode 问题
- unicode 转 中文 ios
- Linux内核裁剪的具体步骤
- Oracle spool 用法小结
- 查看Oracle执行计划的几种方法
- 重装win7后修复grub(LiveCD修复)(win7,ubuntu10.10双系统)
- oracle导出数据到文件中的方法
- objective-c Unicode转中文
- java调用 Oracle存储过程(或函数) 返回游标、动态数组与
- 【出错】libxml2 BOM
- Tomcat中的内存泄漏问题
- Active MQ
- 【分享】说说标准——CSS的错误解析规则
- 从冒险中看到的
- Android.os下的StatFs类主要用来获取文件系统的状态,能够获取sd卡的大小和剩余空间,获取系统内部空间也就是/system的大小和剩余空间等等。
- WEB版的SQL Server 企业管理器