I'm downloading html pages through NSURLConnection which gives me NSData representation of the html page at the end. I need to convert this NSData to NSString in order to parse it. My problem is that this page uses special characters like "ě š č ř ž ý á á í é" etc. and when i convert NSData to NSString i get some jibrish like "–ì¬≠" instead of "í" etc. I know the problem is with encoding, but i have no idea how to overcome this problem... I don't know much about encoding but i found that the site uses utf-8 (and those characters are in czech), so i'm really in dead end...
Here is my code :
NSString* docHTML = [[NSString alloc] initWithBytes: [self.receivedData bytes] length:[self.receivedData length] encoding: NSUTF8StringEncoding];
Thanks for any help