Re: determining HTML text encoding

2010-01-31 Thread Rainer Standke
Hello again, it turns out that the WebKit.framework includes the header for DOMDocument. Nonetheless, I seem to be unable to get anything out of the DOMDocument but (null). Any other ideas? Thanks, Rainer On Jan 29, 2010, at 15:30 , Jens Alfke wrote: On Jan 29, 2010, at 12:33 PM, Rai

Re: determining HTML text encoding

2010-01-29 Thread Jens Alfke
On Jan 29, 2010, at 12:33 PM, Rainer Standke wrote: > NSLog(@"%@", [frame.DOMDocument.characterSet class]); > I get an error: request for member 'characterSet' in something not a > structure or union You may need to #import the header for DOMDocument. > As far as I can tell I am trying to use

Re: determining HTML text encoding

2010-01-29 Thread Rainer Standke
That looks interesting. When I try this: NSLog(@"%@", [frame.DOMDocument.characterSet class]); I get an error: request for member 'characterSet' in something not a structure or union I'm on 10.5.8, if that matters. Is there something I should import into this class? What am I missing here?

Re: determining HTML text encoding

2010-01-29 Thread Jens Alfke
On Jan 29, 2010, at 10:46 AM, Rainer Standke wrote: > I have an app that loads a web page into a webView. From that I grab the main > frame's html text like so: > NSString *htmlString = [[[NSString alloc] initWithData:[[frame dataSource] > data] encoding:NSISOLatin1StringEncoding] autorelease];

Re: determining HTML text encoding

2010-01-29 Thread Paul Sanders
[WebDataSource textEncodingName]? To learn a little more about what might be driving that, see: http://en.wikipedia.org/wiki/Character_encodings_in_HTML#The_document_character_encoding Not sure if / how you can get hold of the HTTP headers via WebKit though, should you need them. Paul Sanders.