Skip to content

Commit

Permalink
Convert strings using toUtf8() instead of toLocal8Bit() before using …
Browse files Browse the repository at this point in the history
…ELF Hashing, fixes duplicate matching breaking where the environment isn't 8bit and toLocal8Bit() will fail. There's a small chance this will break duplicate matching for a few users who are using an 8-bit character encoding which isn't UTF8 compatible but it will fix it for far more users who might be running mythfilldatabase from a cronjob with no proper locale or similar. Refs #10449
  • Loading branch information
stuartm committed Mar 24, 2012
1 parent 83759ac commit 4f9cbeb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mythtv/programs/mythfilldatabase/xmltvparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ ProgInfo *XMLTVParser::parseProgram(
programid.append(uniqueid);
else
{
QString seriesid = QString::number(ELFHash(pginfo->title.toLocal8Bit()
QString seriesid = QString::number(ELFHash(pginfo->title.toUtf8()
.constData()));
pginfo->seriesId = seriesid;
programid.append(seriesid);
Expand Down

0 comments on commit 4f9cbeb

Please sign in to comment.