here is my code, i try to load a html file to an string variable then write it to a html file on computer again, but the problem is that when it export the file and i open the html file by browser it shows me the html content file unexpectedly!
NSURL *url=[NSURL URLWithString:@"http://www.google.com"];
NSString *web=[[NSString alloc]initWithContentsOfURL:url];
[web writeToFile:@"/saleh/index.html" atomically:YES encoding:***NSUTF32BigEndianStringEncoding*** error:&theError];
as i think here is the problem encoding, isn’t it?
Yes, it is problem of encoding, use
NSUTF8StringEncoding