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
This commit is contained in:
timeless%mozdev.org
2003-01-19 00:52:04 +00:00
parent ce888ded2b
commit 7dfa954482
2 changed files with 2 additions and 2 deletions

View File

@@ -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
}

View File

@@ -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
}