Opened 13 years ago

Closed 13 years ago

#1526 closed patch (fixed)

EIT matching of accented/internation characters broken

Reported by: simon@… Owned by: danielk
Priority: minor Milestone: 0.20
Component: mythtv Version: head
Severity: medium Keywords: eit utf8
Cc: Ticket locked: no

Description

The EIT scanner is continuously updating the program table in mythtv with a "Schedule Change" for each program that contains an accented character. Titles without accents or interanational characters (eg; ü è ö...) are unaffected. Here is an example log file entry:

2006-03-16 10:45:04.812 Schedule Change on Channel 1020 2006-03-16 10:45:04.837 Old: 2006-03-18T23:00:00 2006-03-19T00:00:00 John Peters New York: präsentiert durch Jutta Niedhardt 2006-03-16 10:45:04.875 New: 2006-03-18 23:00:00 2006-03-19 00:00:00 John Peters New York: präsentiert durch Jutta Niedhardt

I don't believe that there is actually a real schedule change in each of these situations.

Mysql has the title field of the programs table defined as being a "latin1_swedish_ci" which is as far as I can tell what is defined by default in the mythtv schema/mysql setup.

Attachments (1)

eithelper-utf8-handling.diff (1.6 KB) - added by Stuart Auchterlonie 13 years ago.
Patch to fix problem

Download all attachments as: .zip

Change History (4)

comment:1 Changed 13 years ago by Stuart Auchterlonie

Keywords: eit utf8 added
Milestone: 0.20
Owner: changed from Isaac Richards to Stuart Auchterlonie
Version: 0.19head

Currently investigating this as part of #1035

Changed 13 years ago by Stuart Auchterlonie

Patch to fix problem

comment:2 Changed 13 years ago by Stuart Auchterlonie

Owner: changed from Stuart Auchterlonie to danielk
Type: defectpatch

Attached patch fixes the problem.

Information retrieved out of the database is already in utf8

query.value(1).toString()

returns a utf8 encoded string.

Information coming in on the dvb stream must be converted to utf8

event.Description.utf8()

then these two may be compared for equality and this will give a proper comparison even when the strings contain unicode characters.

comment:3 Changed 13 years ago by danielk

Resolution: fixed
Status: newclosed

(In [9419]) Closes #1526, by applying patch from Stuart Auchterlonie.

Some of the comparisons of EIT collected data with the data in the DB did not compare the text in the same encoding, this changes those comparisons so they are all in utf8.

Note: See TracTickets for help on using tickets.