[mythtv-users] MythVideo: file name sorting oddity

Michael T. Dean mtdean at thirdcontact.com
Thu Dec 13 18:10:32 UTC 2007


On 12/13/2007 08:05 AM, Brion Swanson wrote:
> This suggests that my sorting problem really does lie within the Myth
> code and not my locale or mysql because clearly Myth is re-ordering the
> results from mysql in order to ignore articles and such,

Right.  As Anduin mentioned in a previous post, MythVideo re-sorts the
list independent and does /not/ use a MySQL sort.

>  but in doing so
> I'm wondering if it's unintentionally reversing the order of like-named
> movies (trilogies)?
>   

Not exactly.  Myth is re-sorting the list, but using a different
approach which uses a locale-specific collation order that's not exactly
what you expect.  Myth doesn't pay any attention to the order in which
results are returned by MySQL.

To find out why, feel free to move to another country with a different
locale (including some non-ASCII characters in the alphabet), learn to
speak/read/collate in the language, and then repeat your DB tests. 
(Basically, MySQL could only properly sort the titles (in a
properly-configured MythTV database) if you're using US English or
similar--and even then, as you've discovered, doesn't ignore articles.)

Mike


More information about the mythtv-users mailing list