View | Details | Raw Unified | Return to issue 11755
Collapse All | Expand All

(-)source/expatwrap/xml2utf.cxx (-3 / +7 lines)
Lines 300-311 sal_Bool XMLFile2UTFConverter::scanForEn Link Here
300
			}
300
			}
301
		}
301
		}
302
	}
302
	}
303
	else if( 0xFE == pSource[0] && 0xFF == pSource[1] ) {
303
	else if( 0xFE == static_cast<unsigned char> (pSource[0]) &&
304
			 0xFF == static_cast<unsigned char> (pSource[1]) ) {
304
		// UTF-16 big endian
305
		// UTF-16 big endian
305
		// conversion is done so that encoding information can be easily extracted 
306
		// conversion is done so that encoding information can be easily extracted 
306
		m_sEncoding = "utf-16";
307
		m_sEncoding = "utf-16";
307
	}
308
	}
308
	else if( 0xFF == pSource[0] && 0xFE == pSource[1] ) {
309
	else if( 0xFF == static_cast<unsigned char> (pSource[0]) &&
310
			 0xFE == static_cast<unsigned char> (pSource[1]) ) {
309
		// UTF-16 little endian 
311
		// UTF-16 little endian 
310
		// conversion is done so that encoding information can be easily extracted 
312
		// conversion is done so that encoding information can be easily extracted 
311
		m_sEncoding = "utf-16";
313
		m_sEncoding = "utf-16";
Lines 341-347 sal_Bool XMLFile2UTFConverter::scanForEn Link Here
341
		// UCS-4 little endian
343
		// UCS-4 little endian
342
		m_sEncoding = "ucs-4";
344
		m_sEncoding = "ucs-4";
343
	}
345
	}
344
	else if( 0x4c == pSource[0] && 0x6f == pSource[1]  && 0xa7 == pSource[2] && 0x94 == pSource[3] ) {
346
	else if( 0x4c == pSource[0] && 0x6f == pSource[1]  &&
347
			 0xa7 == static_cast<unsigned char> (pSource[2]) &&
348
			 0x94 == static_cast<unsigned char> (pSource[3]) ) {
345
		// EBCDIC
349
		// EBCDIC
346
		bReturn = sal_False;   // must be extended
350
		bReturn = sal_False;   // must be extended
347
	}
351
	}

Return to issue 11755