iOS9之前
//unicode转中文
NSString* strA = [@"%E4%B8%AD%E5%9B%BD"stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
//中文转unicode
NSString *strB = [@"中国"stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
ios9之后
NSString *urlStr = @"http://img5.imgtn.bdimg.com/it/u=3572074785,265614668&fm=21&gp=0.jpg";
//转成unicode
urlStr = [urlStr stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
//unicode
urlStr = [urlStr stringByRemovingPercentEncoding];