From 7dfa9544825549d153130e84fd298a62e58623f3 Mon Sep 17 00:00:00 2001 From: "timeless%mozdev.org" Date: Sun, 19 Jan 2003 00:52:04 +0000 Subject: [PATCH] Bug 183355 Typo in parser UTF charset detection code patch by alexey@ihug.com.au r=ftang sr=heikki git-svn-id: svn://10.0.0.236/trunk@136613 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/htmlparser/src/nsParser.cpp | 2 +- mozilla/parser/htmlparser/src/nsParser.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mozilla/htmlparser/src/nsParser.cpp b/mozilla/htmlparser/src/nsParser.cpp index 69c099e48d8..26faba90f5e 100644 --- a/mozilla/htmlparser/src/nsParser.cpp +++ b/mozilla/htmlparser/src/nsParser.cpp @@ -2013,7 +2013,7 @@ static PRBool DetectByteOrderMark(const unsigned char* aBytes, PRInt32 aLen, nsS if((0x00==aBytes[2]) && (0x00==aBytes[3])) { // 00 3C 00 00 UCS-4, unusual octet order (3412) oCharset.AssignWithConversion(UCS4_3412); - } else if((0x3C==aBytes[2]) && (0x3F==aBytes[3])) { + } else if((0x00==aBytes[2]) && (0x3F==aBytes[3])) { // 00 3C 00 3F UTF-16, big-endian, no Byte Order Mark oCharset.AssignWithConversion(UCS2_BE); // should change to UTF-16BE } diff --git a/mozilla/parser/htmlparser/src/nsParser.cpp b/mozilla/parser/htmlparser/src/nsParser.cpp index 69c099e48d8..26faba90f5e 100644 --- a/mozilla/parser/htmlparser/src/nsParser.cpp +++ b/mozilla/parser/htmlparser/src/nsParser.cpp @@ -2013,7 +2013,7 @@ static PRBool DetectByteOrderMark(const unsigned char* aBytes, PRInt32 aLen, nsS if((0x00==aBytes[2]) && (0x00==aBytes[3])) { // 00 3C 00 00 UCS-4, unusual octet order (3412) oCharset.AssignWithConversion(UCS4_3412); - } else if((0x3C==aBytes[2]) && (0x3F==aBytes[3])) { + } else if((0x00==aBytes[2]) && (0x3F==aBytes[3])) { // 00 3C 00 3F UTF-16, big-endian, no Byte Order Mark oCharset.AssignWithConversion(UCS2_BE); // should change to UTF-16BE }