Skip to content

Commit

Permalink
Fix the phrase encoding in proglist.cpp. Backports [25424] from trunk.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.mythtv.org/svn/branches/release-0-23-fixes@25427 7dbf422c-18fa-0310-86e9-fd20926502f2
  • Loading branch information
sphery committed Jul 26, 2010
1 parent 4cb7000 commit 67f2658
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions mythtv/programs/mythfrontend/proglist.cpp
Expand Up @@ -912,10 +912,14 @@ void ProgLister::fillViewList(const QString &view)
{
while (query.next())
{
QString phrase = query.value(0).toString();
/* The keyword.phrase column uses utf8_bin collation, so
* Qt uses QString::fromAscii() for toString(). Explicitly
* convert the value using QString::fromUtf8() to prevent
* corruption. */
QString phrase = QString::fromUtf8(query.value(0)
.toByteArray().constData());
if (phrase.isEmpty())
continue;
phrase = query.value(0).toString();
m_viewList << phrase;
m_viewTextList << phrase;
}
Expand Down

0 comments on commit 67f2658

Please sign in to comment.