[mythtv-users] MythVideo: file name sorting oddity

Brion Swanson brions at usalug.net
Wed Dec 12 23:52:54 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).
> 

I guess I'm confused as to why the en_US locale is (to me) screwed up in
the way it orders files/titles.  Is there somewhere I can visit to
expound upon that point?

It doesn't make sense for me to use the C locale when en_US is the
correct locale, but at the same time my locale doesn't appear to make
any sense in the way it does ordering.

If need by I'll compile MythVideo myself and modify the SQL, but that
seems extreme and (should be) unnecessary.

Thanks for you info Anduin!



More information about the mythtv-users mailing list