summaryrefslogtreecommitdiff
path: root/l10ntools/source/export2.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'l10ntools/source/export2.cxx')
-rw-r--r--l10ntools/source/export2.cxx14
1 files changed, 3 insertions, 11 deletions
diff --git a/l10ntools/source/export2.cxx b/l10ntools/source/export2.cxx
index 60ca704c44f8..26f99b59e7c8 100644
--- a/l10ntools/source/export2.cxx
+++ b/l10ntools/source/export2.cxx
@@ -198,18 +198,10 @@ void Export::RemoveUTF8ByteOrderMarker( ByteString &rString ){
}
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 };
-
return rString.Len() >= 3 &&
- rString.GetChar( 0 ) == bom[ 0 ] &&
- rString.GetChar( 1 ) == bom[ 1 ] &&
- rString.GetChar( 2 ) == bom[ 2 ] ;
+ rString.GetChar( 0 ) == '\xEF' &&
+ rString.GetChar( 1 ) == '\xBB' &&
+ rString.GetChar( 2 ) == '\xBF' ;
}
bool Export::fileHasUTF8ByteOrderMarker( const ByteString &rString ){
SvFileStream aFileIn( String( rString , RTL_TEXTENCODING_ASCII_US ) , STREAM_READ );