comparison runner/JAMSFeatureWriter.cpp @ 189:089f1a13963d

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 3536342ac088
children bb295c0feb3e
comparison
equal deleted inserted replaced
188:cbbf8a838b47 189:089f1a13963d
21 21
22 #include "base/Exceptions.h" 22 #include "base/Exceptions.h"
23 #include "rdf/PluginRDFIndexer.h" 23 #include "rdf/PluginRDFIndexer.h"
24 24
25 #include <QFileInfo> 25 #include <QFileInfo>
26 #include <QTextCodec>
26 27
27 #include "version.h" 28 #include "version.h"
28 29
29 JAMSFeatureWriter::JAMSFeatureWriter() : 30 JAMSFeatureWriter::JAMSFeatureWriter() :
30 FileFeatureWriter(SupportOneFilePerTrackTransform | 31 FileFeatureWriter(SupportOneFilePerTrackTransform |
95 const Plugin::FeatureList& features, 96 const Plugin::FeatureList& features,
96 std::string /* summaryType */) 97 std::string /* summaryType */)
97 { 98 {
98 QString transformId = transform.getIdentifier(); 99 QString transformId = transform.getIdentifier();
99 100
100 QTextStream *sptr = getOutputStream(trackId, transformId); 101 QTextStream *sptr = getOutputStream
102 (trackId, transformId, QTextCodec::codecForName("UTF-8"));
101 if (!sptr) { 103 if (!sptr) {
102 throw FailedToOpenOutputStream(trackId, transformId); 104 throw FailedToOpenOutputStream(trackId, transformId);
103 } 105 }
104 106
105 DataId did(trackId, transform); 107 DataId did(trackId, transform);