Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#7813 closed defect (fixed)

Wrong encoding of actor names

Reported by: jan@… Owned by: Isaac Richards
Priority: minor Milestone: 0.23
Component: MythTV - General Version: 0.22-fixes
Severity: medium Keywords:
Cc: Ticket locked: no


In the schedule editor, the "Schedule Information/Program? Details" screen is using a wrong charset when displaying actor names. The actors are stored UTF-8 encoded in the database backend, but the are displayed ISO-8859-1 or ASCII encoded in the frontend.

Change History (7)

comment:1 Changed 12 years ago by stuartm

Resolution: fixed
Status: newclosed

(In [23016]) Declare the correct charset in the Program Details html. Fixes #7813

comment:2 Changed 11 years ago by ylee@…

Resolution: fixed
Status: closednew

r23016 did not fix this bug; it still exists in 0.23-fixes/rc2, regardless of themes used (I've tried Mythbuntu, Arclight, and Terra). It is a recurrence of #2755, although I don't know if they share a cause. MythWeb displays the names correctly.

comment:3 Changed 11 years ago by stuartm

Resolution: wontfix
Status: newclosed

Looks like a QT bug, I'm seeking confirmation but we don't appear to be doing anything wrong on our end, we hand QWebView a unicode encoded string and tell it to display UTF-8, it ignores that and displays Latin1.

comment:4 Changed 11 years ago by stuartm

Resolution: wontfix
Status: closednew

Might have been too hasty, a quick experiment suggests that the issue isn't where I thought it was, it may still be a QT bug but I'll wait to confirm it before closing the ticket this time.

comment:5 Changed 11 years ago by sphery

(In [24485]) 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 powerpriority.priorityname recgrouppassword.recgroup storagegroup.dirname

Refs #7813.

comment:6 Changed 11 years ago by sphery

Resolution: fixed
Status: newclosed

(In [24486]) Fixes #7813. Fix encoding of names in program details screen. Backports [24485] from trunk.

comment:7 Changed 11 years ago by sphery

Milestone: unknown0.23
Note: See TracTickets for help on using tickets.