summaryrefslogtreecommitdiff
path: root/transex3
diff options
context:
space:
mode:
authorPascal Junck <pjunck@openoffice.org>2004-11-02 15:05:02 +0000
committerPascal Junck <pjunck@openoffice.org>2004-11-02 15:05:02 +0000
commitd6fa26ac1594c24104502789e06f7cf37b081ba2 (patch)
treed84d6c88fe56b0f44b07d6fce197123ad9aefe53 /transex3
parent0b197e42c0ee6645966d9b306b1b86d568b5ebc6 (diff)
INTEGRATION: CWS ivo05 (1.18.6); FILE MERGED
2004/09/17 14:54:22 ihi 1.18.6.1: #i34128# Strip UTF8 Byte Order Marker / Repeated language initialisation fixed
Diffstat (limited to 'transex3')
-rw-r--r--transex3/source/lngmerge.cxx15
1 files changed, 11 insertions, 4 deletions
diff --git a/transex3/source/lngmerge.cxx b/transex3/source/lngmerge.cxx
index 3a114b4d37ac..a5c705d2953d 100644
--- a/transex3/source/lngmerge.cxx
+++ b/transex3/source/lngmerge.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: lngmerge.cxx,v $
*
- * $Revision: 1.18 $
+ * $Revision: 1.19 $
*
- * last change: $Author: hr $ $Date: 2004-08-02 16:25:21 $
+ * last change: $Author: pjunck $ $Date: 2004-11-02 16:05:02 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -63,11 +63,11 @@
// local includes
#include "lngmerge.hxx"
#include "utf8conv.hxx"
-
+#include <iostream>
+using namespace std;
//
// class LngParser
//
-
/*****************************************************************************/
LngParser::LngParser( const ByteString &rLngFile, BOOL bUTF8, BOOL bULFFormat , bool bQuiet_in )
/*****************************************************************************/
@@ -84,8 +84,15 @@ LngParser::LngParser( const ByteString &rLngFile, BOOL bUTF8, BOOL bULFFormat ,
SvFileStream aStream( String( sSource, RTL_TEXTENCODING_ASCII_US ), STREAM_STD_READ );
if ( aStream.IsOpen()) {
ByteString sLine;
+ bool bFirstLine = true;
while ( !aStream.IsEof()) {
aStream.ReadLine( sLine );
+
+ if( bFirstLine ){ // Always remove UTF8 BOM from the first line
+ Export::RemoveUTF8ByteOrderMarker( sLine );
+ bFirstLine = false;
+ }
+
pLines->Insert( new ByteString( sLine ), LIST_APPEND );
}
}