Re: [Htmlparser-user] Not able to catch ParserException
Brought to you by:
derrickoswald
|
From: <oys...@me...> - 2007-01-11 17:20:54
|
Martin Sturm wrote:
> Hi,
>
> It is indeed strange and I think it should be filed as a bug if you
> are sure it isn't a problem with your code.
The problem(for me) is when i issue sb.setURL(url) the method itself
catches the ParserException and appends the exception-message as part of
the string I receive in the end. I don't get to handle the real
exception my self ...I think.
If I use the Parser class and parser.setURL(url) I can handle the
exception as I want. So that problem is now solved!
But I also need the parser to figure out the encoding of the page by it
self because the encoding sometimes varies. So this parser might not be
what I'm looking for.
Btw, it seems to stick to ISO-8859-1 no matter what encoding I set with
parser.setEncoding("UTF-8");. (I have not tested this very much).
> What version of the HTMLParser are you using? (I forgot to ask that
> question earlier).
I'm using HTMLParser Version 1.6 (Release Build Jun 10, 2006).
-Øystein
|