diff options
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/parsercsv.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/library/parsercsv.cpp b/src/library/parsercsv.cpp index 646c9f2c2d..f34e5ea2d6 100644 --- a/src/library/parsercsv.cpp +++ b/src/library/parsercsv.cpp @@ -140,9 +140,14 @@ bool ParserCsv::writeCSVFile(const QString &file_str, BaseSqlTableModel* pPlayli qDebug() << "Basepath: " << base; QTextStream out(&file); - out.setCodec("UTF-8"); // rfc4180: Common usage of CSV is US-ASCII ... - // Using UTF-8 to get around codepage issues - // and it's the default encoding in Ooo Calc + // rfc4180: Common usage of CSV is US-ASCII ... + // Using UTF-8 to get around codepage issues + // and it's the default encoding in Ooo Calc +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + DEBUG_ASSERT(out.encoding() == QStringConverter::Utf8); +#else + out.setCodec("UTF-8"); +#endif // writing header section bool first = true; |