[mythtv-users] MythVideo: file name sorting oddity
Brion Swanson
brions at usalug.net
Thu Dec 13 02:56:03 UTC 2007
On Wed, 2007-12-12 at 14:11 -0800, Anduin Withers wrote:
> > [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).
Ok, just for fun I did what you suggested and I see no difference in
output:
[brion ~]$ LC_COLLATE=C ls /nas/movies/ > lc.c.txt
[brion ~]$ LC_COLLATE=en_US ls /nas/movies/ > lc.us.txt
[brion ~]$ diff lc.c.txt lc.us.txt
[brion ~]$
Thoughts?
Brion
More information about the mythtv-users
mailing list