NSData转换字符串的时候遇见GBK格式的字符串
NSStringEncoding enc = CFStringConvertEncodingToNSStringEncoding (kCFStringEncodingGB_18030_2000);
NSString *strshang = [[NSString alloc] initWithBytes:[data bytes] length:[data length] encoding:enc];
NSStringEncoding enc = CFStringConvertEncodingToNSStringEncoding (kCFStringEncodingGB_18030_2000);
NSString *strshang = [[NSString alloc] initWithBytes:[data bytes] length:[data length] encoding:enc];
本文标题:转换GBK字符串
本文链接:https://www.haomeiwen.com/subject/uhakuxtx.html
网友评论