Ticket #7813 (closed defect: fixed)
Opened 2 years ago
Last modified 21 months ago
Wrong encoding of actor names
| Reported by: | jan@… | Owned by: | ijr |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.23 |
| Component: | MythTV - General | Version: | 0.22-fixes |
| Severity: | medium | Keywords: | |
| Cc: | Ticket locked: | no |
Description
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.
Attachments
Change History
comment:1 Changed 2 years ago by stuartm
- Status changed from new to closed
- Resolution set to fixed
comment:2 Changed 22 months ago by ylee@…
- Status changed from closed to new
- Resolution fixed deleted
comment:3 Changed 22 months ago by stuartm
- Status changed from new to closed
- Resolution set to wontfix
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 22 months ago by stuartm
- Status changed from closed to new
- Resolution wontfix deleted
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 21 months ago by mdean
(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 people.name powerpriority.priorityname recgrouppassword.recgroup storagegroup.dirname
Refs #7813.
comment:6 Changed 21 months ago by mdean
- Status changed from new to closed
- Resolution set to fixed

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