it works only with English String (Xcode)

My question comes from here, It works perfectly when I enter an English text, but empty cell appears in Responses when I use other language like Arabic and French.

The problem may be in appending, because when I enter arabic text from a site it appears on Responses.

I have tried putting inputString between English letters or symbols, but with no result.

Here’s the code:

NSURL *url = [NSURL URLWithString:@"https://docs.google.com/forms/d/1pyKGrF-h9aSC2lrKtuacxMctfVBZv_yNmjoxA4cZIc8/formResponse"];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[url standardizedURL]];
[request setHTTPMethod:@"POST"];

//data to send
NSString *postData = @"entry.496878440=";
postData=[postData stringByAppendingString:inputString];

[request setValue:@"application/x-www-form-urlencoded; charset=utf-8" forHTTPHeaderField:@"Content-Type"];

[request setHTTPBody:[postData dataUsingEncoding:NSUTF8StringEncoding]];

NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
[connection start];


Source: forms

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.