Skip to content

Commit 4f9cbeb

Browse files
committed
Convert strings using toUtf8() instead of toLocal8Bit() before using 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
1 parent 83759ac commit 4f9cbeb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mythtv/programs/mythfilldatabase/xmltvparser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ ProgInfo *XMLTVParser::parseProgram(
533533
programid.append(uniqueid);
534534
else
535535
{
536-
QString seriesid = QString::number(ELFHash(pginfo->title.toLocal8Bit()
536+
QString seriesid = QString::number(ELFHash(pginfo->title.toUtf8()
537537
.constData()));
538538
pginfo->seriesId = seriesid;
539539
programid.append(seriesid);

0 commit comments

Comments
 (0)