[mythtv] Sorting in EPG Program Finder

Ben Marchandise mythbma at yahoo.fr
Tue May 13 11:08:56 EDT 2003


Hello,


Ben Bucksch <linux.news at bucksch.org> wrote:
> Shouldn't it be as simple as
> - " title LIKE '%1' OR title LIKE 'The %1' OR title
>LIKE 'A %1'"
> + tr(" title LIKE '%1' OR title LIKE 'The %1' OR
>title LIKE 'A %1'")
> (assuming arg() replaces all occurances)?

If only tr() functions are used, the number of
translated articles in each languages must be exactly
2, to match the English "The" and "A". This would be
too restrictive.
The patch handles any number of articles.

But you're right, I should not get the list of
articles from the database, but from function tr().
I'll fix this.


Torbjörn_Jansson wrote:
> Does the program finder work with non english
characters?
> For example the swedish characters å, ä and ö 

Probably not, as I have not seen a translation of the
request via UTF8 before sending it to the database. 
I'll check this and fix it if possible, as well as the
use of tr() instead of using the database. I'll send a
new patch probably on Thursday.


But, while we're talking of non-English characters, we
have a limitation: the titles having a such character
as the first letter of the first significant word (not
an article) cannot be displayed in EPG :-(
(as in "L'été" in French: first letter after the "L'"
article is "é", so not displayed)

I think this is because the data is stored in UTF8 in
the database, and UTF8 is not supported by mysql
yet(it will be in next version 4.1, now in alpha
stage). So the LIKE clause does not see that "é" is
LIKE "e", and as a result "L'été" is not displayed at
letter "E", or anywhere else. So this should be fixed
when we use mysql 4.1.
Can anyone confirm this ?

Ben.

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com


More information about the mythtv-dev mailing list