//UTF8转GBKNSString *roadName = @“你好”; NSStringEncoding gbkEncoding=CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingGB_18030_2000); NSData*data = [roadName dataUsingEncoding: gbkEncoding];
时间: 2024-09-30 19:03:53
//UTF8转GBKNSString *roadName = @“你好”; NSStringEncoding gbkEncoding=CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingGB_18030_2000); NSData*data = [roadName dataUsingEncoding: gbkEncoding];