Update of /cvsroot/htmlparser/htmlparser/src/org/htmlparser/lexer
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28080
Modified Files:
Page.java
Log Message:
Compare encoding names without case sensitivity.
From HTML spec (http://www.w3.org/TR/html4/charset.html section 5.2.1):
Names for character encodings are case-insensitive, so that for
example "SHIFT_JIS", "Shift_JIS", and "shift_jis" are equivalent.
and from to IANA(http://www.iana.org/assignments/character-sets):
The character set names may be up to 40 characters taken from the
printable characters of US-ASCII. However, no distinction is made
between use of upper and lower case letters.
Index: Page.java
===================================================================
RCS file: /cvsroot/htmlparser/htmlparser/src/org/htmlparser/lexer/Page.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** Page.java 10 Jan 2004 15:23:33 -0000 1.32
--- Page.java 31 Jan 2004 20:51:01 -0000 1.33
***************
*** 684,688 ****
encoding = getEncoding ();
! if (!encoding.equals (character_set))
{
stream = getSource ().getStream ();
--- 684,688 ----
encoding = getEncoding ();
! if (!encoding.equalsIgnoreCase (character_set))
{
stream = getSource ().getStream ();
|