iOS9 URL地址中文转码

NSString*unescaped =@"http=中文";

NSString*escapedString = [unescapedstringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSetURLHostAllowedCharacterSet]];

NSLog(@"escapedString: %@", escapedString);

你可能感兴趣的:(iOS9 URL地址中文转码)