//UTF8转GBKNSString *roadName = @“你好”; NSStringEncoding gbkEncoding=CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingGB_18030_2000); NSData*data = [roadName dataUsingEncoding: gbkEncoding];