when I use NSASCIIStringEncoding to encode some Chinese character for a GET request.
NSLog(@"%@",searchText);
NSString *stringForSearch = [searchText stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding];
NSLog(@"%@",stringForSearch);
2012-05-05 23:51:02.669 StarHopeFundingApprovalSystem[756:f803] 中
2012-05-05 23:51:06.305 StarHopeFundingApprovalSystem[756:f803] (null)
And first log is a Chinese character but the second log is always (null),
Pls help me with this , thank you in advance.
Try using
NSUTF8StringEncodinginsted ofNSASCIIStringEncoding.