阿拉伯数据显示????? 从asp.net mvc到使用networking库的ios应用程序的字符

阿拉伯数据显示????? 从asp.net mvc到iOS应用程序使用networking库来处理响应对象的字符。

#import "AppGateway.h" //the web location of the service #define kAPIHost @"domain" #define kAPIPath @"Home/GetNews/" @implementation AppGateway /*Singleton*/ +(AppGateway*)sharedInstance { static AppGateway *sharedInstance = nil; static dispatch_once_t oncePredicate; dispatch_once(&oncePredicate, ^{ sharedInstance = [[self alloc] initWithBaseURL:[NSURL URLWithString:kAPIHost]]; }); return sharedInstance; } -(AppGateway*)init{ self = [super init]; if(self!=nil) { [self registerHTTPOperationClass:[AFJSONRequestOperation class]]; [self setDefaultHeader:@"Accept" value:@"application/json"]; } return self; } -(void)commandWithParams:(NSMutableDictionary *)params onCompletion:(JSONResponseBlock)completionBlock{ NSMutableURLRequest *apiRequest = [self multipartFormRequestWithMethod:@"POST" path:kAPIPath parameters:params constructingBodyWithBlock:^(id <AFMultipartFormData>formData){ }]; AFJSONRequestOperation *operation = [[AFJSONRequestOperation alloc] initWithRequest:apiRequest]; [operation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject){ NSLog(@"AFNTSUCCESS"); //This is where response object carry arabic data corrupted to '??????????' completionBlock(responseObject); } failure:^(AFHTTPRequestOperation *operation, NSError *error) { NSLog(@"AFNTFAILURE"); completionBlock([NSDictionary dictionaryWithObject:[error localizedDescription] forKey:@"error"]); }]; [operation start]; } @end 

这是我用来连接到mvc操作的课程。 谢谢

是的,它的工作原理是不是从networking或mvc服务器的问题。 对不起