NSString *str = @"北京";
NSString * encodedString = (NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault,
(CFStringRef)str,NULL,NULL,kCFStringEncodingUTF8);
NSString * strTqWeb = [NSString stringWithFormat:@"http://webservice.webxml.com.cn/WebServices/WeatherWS.asmx/getWeather?theCityCode=%@&theUserID=",encodedString];
iOS 网络请求URL包含中文解决方法
最新推荐文章于 2024-07-16 15:30:15 发布