# HG changeset patch # User Chris Cannam # Date 1425316894 0 # Node ID 682d64f05e72d0d83ae0c75a7a4962c0eb3bbeee # Parent d74ebd2d2c4906096870cf49ac0b4f37dabeda29# Parent 780959a4fe23619a2efdfaaa2414e9f3ec18045f Merge diff -r 780959a4fe23 -r 682d64f05e72 rdf/RDFFeatureWriter.cpp --- a/rdf/RDFFeatureWriter.cpp Thu Feb 26 09:44:08 2015 +0000 +++ b/rdf/RDFFeatureWriter.cpp Mon Mar 02 17:21:34 2015 +0000 @@ -22,6 +22,7 @@ #include "PluginRDFIndexer.h" #include +#include #include #include #include @@ -160,7 +161,8 @@ // Need to select appropriate output file for our track/transform // combination - QTextStream *stream = getOutputStream(trackId, transform.getIdentifier()); + QTextStream *stream = getOutputStream(trackId, transform.getIdentifier(), + QTextCodec::codecForName("UTF-8")); if (!stream) { throw FailedToOpenOutputStream(trackId, transform.getIdentifier()); } diff -r 780959a4fe23 -r 682d64f05e72 transform/CSVFeatureWriter.cpp --- a/transform/CSVFeatureWriter.cpp Thu Feb 26 09:44:08 2015 +0000 +++ b/transform/CSVFeatureWriter.cpp Mon Mar 02 17:21:34 2015 +0000 @@ -23,6 +23,7 @@ #include #include +#include using namespace std; using namespace Vamp; @@ -123,7 +124,9 @@ // Select appropriate output file for our track/transform // combination - QTextStream *sptr = getOutputStream(trackId, transformId); + QTextStream *sptr = getOutputStream(trackId, + transformId, + QTextCodec::codecForName("UTF-8")); if (!sptr) { throw FailedToOpenOutputStream(trackId, transformId); } @@ -169,7 +172,9 @@ i != m_pending.end(); ++i) { DataId tt = i->first; Plugin::Feature f = i->second; - QTextStream *sptr = getOutputStream(tt.first, tt.second.getIdentifier()); + QTextStream *sptr = getOutputStream(tt.first, + tt.second.getIdentifier(), + QTextCodec::codecForName("UTF-8")); if (!sptr) { throw FailedToOpenOutputStream(tt.first, tt.second.getIdentifier()); } diff -r 780959a4fe23 -r 682d64f05e72 transform/FileFeatureWriter.cpp --- a/transform/FileFeatureWriter.cpp Thu Feb 26 09:44:08 2015 +0000 +++ b/transform/FileFeatureWriter.cpp Mon Mar 02 17:21:34 2015 +0000 @@ -315,7 +315,8 @@ QTextStream *FileFeatureWriter::getOutputStream(QString trackId, - TransformId transformId) + TransformId transformId, + QTextCodec *codec) { QFile *file = getOutputFile(trackId, transformId); if (!file && !m_stdout) { @@ -328,6 +329,7 @@ } else { m_streams[file] = new QTextStream(file); } + m_streams[file]->setCodec(codec); } QTextStream *stream = m_streams[file]; diff -r 780959a4fe23 -r 682d64f05e72 transform/FileFeatureWriter.h --- a/transform/FileFeatureWriter.h Thu Feb 26 09:44:08 2015 +0000 +++ b/transform/FileFeatureWriter.h Mon Mar 02 17:21:34 2015 +0000 @@ -32,6 +32,7 @@ using std::pair; class QTextStream; +class QTextCodec; class QFile; class FileFeatureWriter : public FeatureWriter @@ -55,7 +56,7 @@ }; FileFeatureWriter(int support, QString extension); - QTextStream *getOutputStream(QString, TransformId); + QTextStream *getOutputStream(QString, TransformId, QTextCodec *); typedef pair TrackTransformPair; typedef map FileNameMap;