/**spa
* GBK->UTF8code
*/ci
//方法一 舊方法string
//NSString *encode1 = [@"%E6%88%91" stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];it
//NSLog(@"--encode1->%@<------", encode1);class
//方法二 新方法coding
//NSLog(@"--encode2->%@<------", [@"%E6%88%91" stringByRemovingPercentEncoding]);方法
/**di
* UTF-8 ->GBKvi
*/
//方法一 舊方法
//NSString *decode1 = [@"我" stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
//NSLog(@"--decode1-->%@<-----", decode1);
//方法二 新方法
//NSLog(@"--decode1-->%@<-----", [@"我" stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]]);