[mythtv] utf8 and local8Bit in log messages

Kai Fritzowsky mythtv-dev at blackhole.hadinet.de
Sat Apr 2 11:39:16 UTC 2005


Hi!

This tiny patch logs recording messages in local8Bit instead of ut8.

Explaination:
In libs/libmythtv/jobqueue.cpp a log message is built this way:
    QString logDesc = QString("\"%1\" recorded from channel %2 at %3")
                          .arg(program_info->title.local8Bit())
                          .arg(program_info->chanid)
                          .arg(program_info->startts.toString());
[...]
    QString msg = QString("Starting Commercial Flagging for %1.")
                          .arg(logDesc);

The same thing is done that way in libs/libmythtv/scheduledrecording.cpp
and programs/mythbackend/scheduler.cpp:

            msg += QString(" \"%1\" on channel: %2 on cardid: %3, "
                           "sourceid %4").arg(nextRecording->title)
                .arg(nextRecording->chanid)
                .arg(nextRecording->cardid)
                .arg(nextRecording->sourceid);
[...]
            gContext->LogEntry("scheduler", LP_NOTICE, "Schedule Change", 
                               msg.utf8());

This leads to the following results for me when I go to
Information Center/System Status/Log Entries:

Finished recording Star Trek: Das nÀchste Jahrhundert ...
Finished Commercial Flagging for "Star Trek: Das nächste ...

With this patch, all entries will be shown correctly.

/Kai
-------------- next part --------------
Index: libs/libmythtv/scheduledrecording.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/scheduledrecording.cpp,v
retrieving revision 1.138
diff -r1.138 scheduledrecording.cpp
432c432
<                        msg.utf8());
---
>                        msg.local8Bit());
Index: programs/mythbackend/scheduler.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/programs/mythbackend/scheduler.cpp,v
retrieving revision 1.140
diff -r1.140 scheduler.cpp
1080c1080
<                                msg.utf8());
---
>                                msg.local8Bit());


More information about the mythtv-dev mailing list