NSurll转中文

   NSString *string = [NSString stringWithFormat:@"%@search&keyword=%@&size=10&page=%d",GAMEBASEURL,keyWord,pageNum];

    [string stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

    NSString *encode = (NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)string, NULL, NULL, kCFStringEncodingUTF8);

    NSURL *url = [NSURL URLWithString:encode];

你可能感兴趣的:(NSurll转中文)