Author: hdu
Date: Mon Mar 4 14:20:14 2013
New Revision: 1452319
URL: http://svn.apache.org/r1452319
Log:
WaE: fix narrowing conversion for systems with signed char
Modified:
openoffice/trunk/main/l10ntools/source/export2.cxx
Modified: openoffice/trunk/main/l10ntools/source/export2.cxx
URL:
http://svn.apache.org/viewvc/openoffice/trunk/main/l10ntools/source/export2.cxx?rev=1452319&r1=1452318&r2=1452319&view=diff
==============================================================================
--- openoffice/trunk/main/l10ntools/source/export2.cxx (original)
+++ openoffice/trunk/main/l10ntools/source/export2.cxx Mon Mar 4 14:20:14 2013
@@ -263,13 +263,8 @@ void Export::RemoveUTF8ByteOrderMarker(
}
bool Export::hasUTF8ByteOrderMarker( const ByteString &rString ){
- // Byte order marker signature
-
- const unsigned char c1 = 0xEF;
- const unsigned char c2 = 0xBB;
- const unsigned char c3 = 0xBF;
-
- const char bom[ 3 ] = { c1 , c2 , c3 };
+ // UTF-8 BOM: Byte order marker signature
+ static const unsigned char bom[3] = { 0xEF, 0xBB, 0xBF };
return rString.Len() >= 3 &&
rString.GetChar( 0 ) == bom[ 0 ] &&