summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/flat/ETable.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/flat/ETable.cxx')
-rw-r--r--connectivity/source/drivers/flat/ETable.cxx5
1 files changed, 4 insertions, 1 deletions
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 )
{