mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 11:00:44 -06:00
Change the newline character for CSV export depending upon the platform
This commit is contained in:
@@ -67,7 +67,13 @@ bool ExportCsvDialog::exportQuery(const QString& sQuery, const QString& sFilenam
|
||||
QChar quoteChar = currentQuoteChar();
|
||||
QString quotequoteChar = QString(quoteChar) + quoteChar;
|
||||
QChar sepChar = currentSeparatorChar();
|
||||
|
||||
// Choose appropriate newline character for the platform
|
||||
#ifdef Q_OS_WIN
|
||||
QString newlineChar = "\r\n";
|
||||
#else
|
||||
QString newlineChar = "\n";
|
||||
#endif
|
||||
|
||||
// chars that require escaping
|
||||
std::string special_chars = newlineChar.toStdString() + sepChar.toLatin1() + quoteChar.toLatin1();
|
||||
|
||||
Reference in New Issue
Block a user