当前位置:编程学习 > wap >>

ios gb2312转utf-8

 
+(NSString *) gb2312toutf8:(NSData *) data{
 
    NSStringEncoding enc =CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingGB_18030_2000); 
    NSString *retStr = [[NSString alloc] initWithData:data encoding:enc];
    
    return retStr;
}
补充:移动开发 , IOS ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,