OC使用爬虫获取网页源码需要GB_18030_2000
代码:
NSStringEncoding customEnc = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingGB_18030_2000);
查阅资料,发现Swift中:
let customEnc = CFStringConvertEncodingToNSStringEncoding(UInt32(CFStringEncodings.GB_18030_2000.rawValue))