[mythtv-commits] mythtv commit: r24485 by mdean

mythtv at cvs.mythtv.org mythtv at cvs.mythtv.org
Sat May 8 03:56:02 UTC 2010


      Author: mdean
        Date: 2010-05-08 03:56:02 +0000 (Sat, 08 May 2010)
New Revision: 24485
   Changeset: http://svn.mythtv.org/trac/changeset/24485

Modified:

   trunk/mythtv/programs/mythfrontend/progdetails.cpp

Log:

Fix encoding of names in program details screen.

Qt-MySQL drivers use QVariant::ByteArray for string-type MySQL fields marked with the BINARY attribute (those using a *_bin collation) and QVariant::String for all others.  Since QVariant::toString() uses QString::fromAscii() (through QVariant::convert()) when the QVariant's type is QVariant::ByteArray, we have to use QString::fromUtf8() explicitly to prevent corrupting characters for any columns using a binary collation (or, at the minimum, in any location where the value retrieved from the database is shown to the user).

The following columns are binary (using utf8_bin collation), and may require similar treatment:
keyword.phrase
oldprogram.oldtitle
people.name
powerpriority.priorityname
recgrouppassword.recgroup
storagegroup.dirname

Refs #7813.





More information about the mythtv-commits mailing list