[mythtv-commits] Ticket #8530: Wrong encoding of phrases

MythTV mythtv at cvs.mythtv.org
Fri Jun 4 10:35:13 UTC 2010


#8530: Wrong encoding of phrases
-----------------------------------+----------------------------------------
 Reporter:  sandybigboy@…          |       Owner:  ijr       
     Type:  patch                  |      Status:  new       
 Priority:  minor                  |   Milestone:  unknown   
Component:  MythTV - General       |     Version:  Trunk Head
 Severity:  medium                 |     Mlocked:  0         
-----------------------------------+----------------------------------------
 In the Manage Recordings->Schedule Recordings->Search Words->Titles (an
 other options in this menu), the "Title/Phrase" screen is using a wrong
 charset when displaying phrases. The phrases are stored UTF-8 encoded in
 the database backend, but the are displayed ISO-8859-1 or ASCII encoded in
 the frontend. This is similar to other ticket #7813
 [http://svn.mythtv.org/trac/ticket/7813]. In the course of the discussion
 in this ticket [http://svn.mythtv.org/trac/ticket/7813#comment:5] mdean
 wrote:
 "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
 "

 Attached patch fixes bug with wrong encoding of phrases stored in
 keyword.phrase field.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/8530>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list