Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/lexer
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15396/lexer
Modified Files:
Page.java
Log Message:
Fix bug 1322686 when illegal charset specified
Use current source charset as the default if there is already a source.
Index: Page.java
===================================================================
RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/lexer/Page.java,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -d -r1.51 -r1.52
*** Page.java 20 Jun 2005 01:56:32 -0000 1.51
--- Page.java 25 Oct 2005 02:06:46 -0000 1.52
***************
*** 251,255 ****
* @see #DEFAULT_CHARSET
*/
! public static String getCharset (String content)
{
final String CHARSET_STRING = "charset";
--- 251,255 ----
* @see #DEFAULT_CHARSET
*/
! public String getCharset (String content)
{
final String CHARSET_STRING = "charset";
***************
*** 257,261 ****
String ret;
! ret = DEFAULT_CHARSET;
if (null != content)
{
--- 257,266 ----
String ret;
! if (null == mSource)
! ret = DEFAULT_CHARSET;
! else
! // use existing (possibly supplied) character set:
! // bug #1322686 when illegal charset specified
! ret = mSource.getEncoding ();
if (null != content)
{
|