Modify

Ticket #8530 (closed patch: fixed)

You must read the TicketHowTo before creating a new ticket or commenting on an existing ticket.

Opened 21 months ago

Last modified 17 months ago

Wrong encoding of phrases

Reported by: sandybigboy@… Owned by: mdean
Priority: minor Milestone: 0.23-fixes
Component: MythTV - General Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

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.

Attachments

phrase_encoding_in_proglist.patch Download (786 bytes) - added by sandybigboy@… 21 months ago.

Change History

Changed 21 months ago by sandybigboy@…

comment:1 Changed 21 months ago by danielk

  • Owner changed from ijr to mdean
  • Status changed from new to assigned

comment:2 Changed 20 months ago by mdean

  • Status changed from assigned to accepted

comment:3 Changed 19 months ago by mdean

(In [25424]) Fix the phrase encoding in proglist.cpp.

This is another case of improper conversion of utf8_bin column data, like the case in #7813. This fixes the issue until I can convert all the utf8_bin columns to utf8_general_ci.

Refs #8530. Thanks to sandybigboy for identifying the issue and submitting the patch.

comment:4 Changed 19 months ago by mdean

  • Status changed from accepted to closed
  • Resolution set to fixed

Fixed in [25427] .

Fix the phrase encoding in proglist.cpp. Backports [25424] from trunk.

comment:5 Changed 17 months ago by stuartm

  • Milestone changed from unknown to 0.23-fixes
View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.