Author: amassari
Date: Tue Feb 28 07:57:05 2006
New Revision: 381685

URL: http://svn.apache.org/viewcvs?rev=381685&view=rev
Log:
Remove BOM-detection code inside refreshCharBuffer: the fix for jira# 1284 
makes it unnecessary, and the UTF-8 part was updating the wrong index (jira# 
1385)

Modified:
    xerces/c/trunk/src/xercesc/internal/XMLReader.cpp

Modified: xerces/c/trunk/src/xercesc/internal/XMLReader.cpp
URL: 
http://svn.apache.org/viewcvs/xerces/c/trunk/src/xercesc/internal/XMLReader.cpp?rev=381685&r1=381684&r2=381685&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/internal/XMLReader.cpp (original)
+++ xerces/c/trunk/src/xercesc/internal/XMLReader.cpp Tue Feb 28 07:57:05 2006
@@ -568,39 +568,6 @@
     }
 
     //
-    //  If we are on our first block of chars and the encoding is one of the
-    //  UTF-16 formats, then check the first char for the BOM and skip over
-    //  it manually.
-    //
-    if (fCharsAvail)
-    {
-        if ((fCurLine == 1) && (fCurCol == 1))
-        {
-            if (((fEncoding == XMLRecognizer::UTF_16L)
-            ||   (fEncoding == XMLRecognizer::UTF_16B))
-            &&  !startInd)
-            {
-                if ((fCharBuf[startInd] == chUnicodeMarker)
-                ||  (fCharBuf[startInd] == chSwappedUnicodeMarker))
-                {
-                    fCharIndex++;
-                }
-            }
-            // If there's a utf-8 BOM  (0xEF 0xBB 0xBF), skip past it.
-            else {
-                const char* asChars = (const char*)fRawByteBuf;
-                if ((fRawBytesAvail > XMLRecognizer::fgUTF8BOMLen )&&
-                    (XMLString::compareNString(  asChars
-                    , XMLRecognizer::fgUTF8BOM
-                    , XMLRecognizer::fgUTF8BOMLen) == 0) && !startInd)
-                {
-                    fCharIndex += XMLRecognizer::fgUTF8BOMLen;
-                }
-            }
-        }
-    }
-
-    //
     //  If we get here with no more chars, then set the fNoMore flag which
     //  lets us optimize and know without checking that no more chars are
     //  available.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to