1、GBK转换成NSString
NSStringEncoding enc =CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingGB_18030_2000);
NSString *retStr = [[NSStringalloc] initWithData:responseObjectencoding:enc];
2、NSString 转换成UTF8
NSString *dataUTF8 = [data stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
3、UTF8转换成GBK
NSStringEncoding enc = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingGB_18030_2000);
NSData *da = [data dataUsingEncoding:enc allowLossyConversion:YES];
NSString *retStr = [[NSString alloc] initWithData:da encoding:enc];