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* returnStr = [NSPropertyListSerialization propertyListFromData:tempData

mutabilityOption:NSPropertyListImmutable

format:NULL

errorDescription:NULL];

return [returnStr stringByReplacingOccurrencesOfString:@"\\r\\n" withString:@"\n"];

}

unicode 转换成中文的更多相关文章

  1. JAVA unicode转换成中文

    /** * * unicode 转换成 中文 * @param theString * @return */ public static String decodeUnicode(String the ...

  2. Python将list中的unicode转换成中文显示

    有这样一个列表: list = [{'channel_id': -3, 'name': u'\u7ea2\u5fc3\u5146\u8d6b'}, {u'seq_id': 0, u'name_en': ...

  3. jmeter返回的Unicode转换成utf8

    该问题通过查找资料借鉴前辈门的经验得到了解决,记录下来是为了后面能够用到 最近发现有些接口返回的时unicode类型的,如下图所示: 因此只需要在jmeter中添加后置处理器:BeanShell Po ...

  4. 在eclipse中安装properties插件PropertiesEditor及设置(附图),ASCII码转换成中文

    在eclipse中安装properties插件PropertiesEditor及设置(附图),ASCII码转换成中文安装成功后ASCII还是不能转换成中文的,原因是设置里面没有把编码设置为utf8的, ...

  5. c#金额转换成中文大写金额

    2018-08-24 转别人 c#金额转换成中文大写金额 /// <summary> /// 金额转换成中文大写金额 /// </summary> /// <param ...

  6. oracle改进之将阿拉伯数字转换成中文数字

    本博客是自己在学习和工作途中的积累与总结,仅供自己参考,也欢迎大家转载,转载时请注明出处   http://www.cnblogs.com/king-xg/p/6839738.html 将阿拉伯数字转 ...

  7. PHP 数字金额转换成中文大写金额的函数 数字转中文

    /** *数字金额转换成中文大写金额的函数 *String Int $num 要转换的小写数字或小写字符串 *return 大写字母 *小数位为两位 **/ function num_to_rmb($ ...

  8. c#金额转换成中文大写金额 .Net开发Windows服务

    c#金额转换成中文大写金额   2018-08-24 转别人 c#金额转换成中文大写金额 /// <summary> /// 金额转换成中文大写金额 /// </summary> ...

  9. 在C#中将金额转换成中文大写金额

    具体代码如下: /// <summary> /// 金额转换成中文大写金额 /// </summary> /// <param name="LowerMoney ...

随机推荐

  1. No member named 'setResizeMode' in 'QHeaderView' - Convert Qt 4.7 to Qt 5.8

    https://stackoverflow.com/questions/42743141/no-member-named-setresizemode-in-qheaderview-convert-qt ...

  2. HBase预分区方法

    (what)什么是预分区? HBase表在刚刚被创建时,只有1个分区(region),当一个region过大(达到hbase.hregion.max.filesize属性中定义的阈值,默认10GB)时 ...

  3. RTC实时时钟-备份区域BKP--原理讲解

    RTC(Real Time Clock):实时时钟 BCD码:用4位2进制来表示10以内的十进制的形式. RTC的时钟源:LSE(32.768KHZ).HSE_RTC.LSI.经过一个精密校准(RTC ...

  4. Java Persistence with MyBatis 3(中文版) 前言

    对很多软件系统而言,保存数据到数据库和从数据库中检索数据是其工作流程中至关重要的一部分.在 Java 领域,有很多的实现了数据持久化层的工具和框架,它们每一个都有自己不同的实现方法.而 MyBatis ...

  5. [GO]并的爬取捧腹的段子

    package main import ( "fmt" "strconv" "net/http" "regexp" &q ...

  6. [GO]json解析到map

    package main import ( "encoding/json" "fmt" ) var str string func main() { m := ...

  7. Yii2在Form中处理短信验证码的Validator,耦合度最低的短信验证码验证方式

    短信验证码在目前大多数web应用中都会有,本文介绍一个基于Yii2 Validator方式的验证码验证方式. 在其他文章中看到的方式大多比较难做到一次封装,多次重用. 使用此方式的好处自然不用多说,V ...

  8. vs2015发布网站至azure web应用服务

    进入www.azure.cn管理门户 1,左下角新建web应用,实例如下,url设置为demo(有防止重名判断) 2,进入demo配置页(左侧web应用下点击demo) 3,demo首页,下载配置文件 ...

  9. up7.1-asp.net-本地测试教程

    1.1. ASP.NET 框架:.NET Framework 4.5 依赖库:csredis,Newtonsoft.Json   安装redis 下载 redis-x64:http://pan.bai ...

  10. JAVA&JS debug

    JAVA Chrome Sources 如果当前代码所在文件页面为一界面 →                              →| -------------------------- ↓↑ ...