汉字百分比编码之间转换

    // 汉字 转 百分百编码
    NSString * encodeString = [@"汉字" stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLHostAllowedCharacterSet];
    
    
    NSLog(@"%@",encodeString);
    
    // 百分比编码 转 汉字
    encodeString = [encodeString stringByRemovingPercentEncoding];
    
    NSLog(@"%@",encodeString);

汉字百分比编码之间转换_第1张图片



你可能感兴趣的:(汉字百分比编码之间转换)