Mercurial > hg > svcore
diff transform/CSVFeatureWriter.cpp @ 1035:d74ebd2d2c49
Require (and provide) text codec for output stream -- fixing #1153 (wrong codec used when writing RDF)
author | Chris Cannam |
---|---|
date | Mon, 02 Mar 2015 17:17:59 +0000 |
parents | d954e03274e8 |
children | b14064bd1f97 |
line wrap: on
line diff
--- a/transform/CSVFeatureWriter.cpp Mon Dec 08 15:37:12 2014 +0000 +++ b/transform/CSVFeatureWriter.cpp Mon Mar 02 17:17:59 2015 +0000 @@ -23,6 +23,7 @@ #include <QRegExp> #include <QTextStream> +#include <QTextCodec> 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()); }