2018-08-02 Fred Gleason <fredg@paravelsystems.com>

* Modified reports in rdlibrary(1) to display UTF-8 strings
	correctly.
This commit is contained in:
Fred Gleason
2018-08-02 16:03:29 -04:00
parent 4e125e2de7
commit 7d54bc3691
15 changed files with 256 additions and 192 deletions

View File

@@ -78,15 +78,15 @@ bool RDReport::ExportTextLog(const QString &filename,const QDate &startdate,
// Write File Header
//
if(startdate==enddate) {
*strm << Center(QString("Rivendell RDAirPlay Playout Report for ")+
*strm << RDReport::center(QString("Rivendell RDAirPlay Playout Report for ")+
startdate.toString("MM/dd/yyyy"),78)+"\n";
}
else {
*strm << Center(QString("Rivendell RDAirPlay Playout Report for ")+
*strm << RDReport::center(QString("Rivendell RDAirPlay Playout Report for ")+
startdate.toString("MM/dd/yyyy")+" - "+
enddate.toString("MM/dd/yyyy"),78)+"\n";
}
*strm << Center(name()+" -- "+description(),78)+"\n";
*strm << RDReport::center(name()+" -- "+description(),78)+"\n";
*strm << "--Time-- -Cart- Cut --Title---------------- A-Len N-Len --Host---- Srce\n";
//
@@ -107,12 +107,12 @@ bool RDReport::ExportTextLog(const QString &filename,const QDate &startdate,
}
cart_num=QString().sprintf(cart_fmt,q->value(1).toUInt());
*strm << q->value(2).toTime().toString("hh:mm:ss")+" ";
*strm << RightJustify(cart_num,6)+" ";
*strm << RDReport::rightJustify(cart_num,6)+" ";
*strm << cut+" ";
*strm << LeftJustify(q->value(8).toString(),23)+" ";
*strm << RDReport::leftJustify(q->value(8).toString(),23)+" ";
*strm << RDGetTimeLength(q->value(0).toInt(),true,false).right(5)+" ";
*strm << RDGetTimeLength(q->value(8).toInt(),true,false).right(5)+" ";
*strm << LeftJustify(q->value(10).toString(),10)+" ";
*strm << RDReport::leftJustify(q->value(10).toString(),10)+" ";
switch((RDLogLine::PlaySource)q->value(11).toInt()) {
case RDLogLine::MainLog:
*strm << "Main";