I'm downloading a webpage using NSMutableURLRequest but having problem putting that very webpage into a NSString.
NSString *username = @"my_username";
NSString *password = @"my_password";
NSURL* url = [NSURL URLWithString:[NSString stringWithFormat:@"https://www.mypage.com/login.php?username=%@&password=%@", username, password]];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];
NSString *returnPage = [NSString stringWithFormat:@"%.*s", [returnData length], [returnData bytes]];
This works fine except for special chars like åäö etc. Is there any better way?