connectivity/source/drivers/flat/ETable.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit aa69f2a176329795fad957ac639329307c146e58
Author:     Andreas Heinisch <andreas.heini...@yahoo.de>
AuthorDate: Tue Aug 31 19:48:13 2021 +0200
Commit:     Eike Rathke <er...@redhat.com>
CommitDate: Fri Sep 10 16:22:38 2021 +0200

    tdf#123055 - Start to read unicode text in order to avoid the BOM
    
    Change-Id: Ica5a2e11b4be1764cc94aafe5366197065cf6363
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121391
    Tested-by: Jenkins
    Reviewed-by: Eike Rathke <er...@redhat.com>

diff --git a/connectivity/source/drivers/flat/ETable.cxx 
b/connectivity/source/drivers/flat/ETable.cxx
index 2a7bd3d26362..0574130ee993 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -65,6 +65,8 @@ void OFlatTable::fillColumns(const css::lang::Locale& 
_aLocale)
 {
     m_bNeedToReadLine = true; // we overwrite m_aCurrentLine, seek the stream, 
...
     m_pFileStream->Seek(0);
+    // tdf#123055 - start to read unicode text in order to avoid the BOM
+    m_pFileStream->StartReadingUnicodeText(RTL_TEXTENCODING_DONTKNOW);
     m_aCurrentLine = QuotedTokenizedString();
     bool bRead = true;
 
@@ -72,7 +74,8 @@ void OFlatTable::fillColumns(const css::lang::Locale& 
_aLocale)
     const bool bHasHeaderLine = pConnection->isHeaderLine();
 
     QuotedTokenizedString aHeaderLine;
-    TRowPositionInFile rowPos(0, 0);
+    const sal_Int32 nPos = static_cast<sal_Int32>(m_pFileStream->Tell());
+    TRowPositionInFile rowPos(nPos, nPos);
     sal_Int32 rowNum(0);
     if ( bHasHeaderLine )
     {

Reply via email to