//UTF8转GBKNSString *roadName = @“你好”; NSStringEncoding gbkEncoding=CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingGB_18030_2000); NSData*data = [roadName dataUsingEncoding: gbkEncoding];
编码转换:String 的 UTF8转 GBK
原文:http://www.cnblogs.com/sunmair/p/7275048.html