1.gbk转utf8
NSData *uncompressedData = [request responseData];
NSStringEncoding enc = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingGB_18030_2000);
NSString* jsonString = [[NSString alloc]initWithData:uncompressedData encoding:enc];
NSLog(@"jsonString = %@", jsonString);
2,utf8转gbk
1) NSStringEncoding enc = CFStringConvertEncodingToNSStringEncoding(kCFStringEncodingGB_18030_2000);
str = [str stringByAddingPercentEscapesUsingEncoding:enc];
2) urlString = (NSString *)CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)urlString, nil, nil, enc));