[mythtv-users] MythVideo: file name sorting oddity

Anduin Withers awithers at anduin.com
Wed Dec 12 22:11:37 UTC 2007


> [example where items don't sort "normally"]
> Which is completely un-intuitive to me.  Could someone explain this
> behavior and preferably how to fix it?

This assumes you are ordering by filename and not title in your filter.

The order would depend on the collation order for your locale.

For a simple example (Some-Movie.ext Some-Movie_2.ext Some-Movie_3.ext) will
sort to (Some-Movie_2.ext Some-Movie_3.ext Some-Movie.ext) in something like
en_US while your hoped for ordering would be the result of something more
simple (like the C locale).

To see the difference go to a command prompt and use ls:

LC_COLLATE=C ls
vs.
LC_COLLATE=en_US ls

If you are using title sorting, well it doesn't actually compare just the
title, and is also locale aware (and has a bug in the non-trunk version
which can cause similar sorting issues).

-- 
Anduin Withers



More information about the mythtv-users mailing list