Reading html with accented characters from a URL on iPhone
Posted
by lbh
on Stack Overflow
See other posts from Stack Overflow
or by lbh
Published on 2010-06-08T00:33:53Z
Indexed on
2010/06/08
0:42 UTC
Read the original article
Hit count: 207
iphone
|objective-c
Hello,
I'm having trouble extracting the html from a website which contains accented characters. Specifically, there are French characters on the site. Currently I'm using:
NSString* html= [NSString stringWithContentsOfURL: [NSURL URLWithString: url] usedEncoding: &enc error:&error];
to get html from a URL. It works perfectly fine for any sites which are all English, but with a mostly English site with French characters it returns nothing. I've tried a few different types of encoding, but none have worked for me. Any suggestions?
Thanks.
© Stack Overflow or respective owner