URL包含中文转码

2016-10-18  本文已影响80人  Liberalism

NSString *newUrlString = [urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSString *newUrlString = [urlString stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];

上一篇下一篇

猜你喜欢

热点阅读