Skip to content
Permalink
Browse files
fixes wrong ordering of diacritics on a browse view section - e.g. fr…
…ench accentuated letters appearing at the end of the list
  • Loading branch information
Sebastien Francois committed May 29, 2014
1 parent da2695a commit e52892e159bccbd95aabe8edc213d82ee9223ecf
Showing with 4 additions and 1 deletion.
  1. +4 −1 perl_lib/EPrints/MetaField.pm
@@ -108,6 +108,7 @@ use EPrints::Const qw( :metafield );
use strict;

use Text::Unidecode qw();
use Unicode::Collate;

$EPrints::MetaField::VARCHAR_SIZE = 255;

@@ -945,7 +946,9 @@ sub sort_values
$ov{$_} = $self->ordervalue_single( $_, $self->{repository}, $langid );
}

my @out_list = sort { defined $a <=> defined $b || $ov{$a} cmp $ov{$b} } @$in_list;
my $col = Unicode::Collate->new();

my @out_list = sort { defined $a <=> defined $b || $col->cmp( $ov{$a}, $ov{$b} ) } @$in_list;

return \@out_list;
}

0 comments on commit e52892e

Please sign in to comment.