EPrints Technical Mailing List Archive
Message: #01417
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Re: Sort result by author, by title
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: [EP-tech] Re: Sort result by author, by title
- From: Mark Gregson <mark.gregson@qut.edu.au>
- Date: Tue, 18 Dec 2012 10:33:59 +1000
Hi Mario We had the same problem in 3.2. I think the solution was to implement a custom orderkey on the author's id field which our author view is based on (in our repository the id field contains family_name + given_name). The custom order key uses Text::Unidecode to strip the diacritics from letters for sorting and grouping purposes. See example below. use Text::Unidecode; sub make_id_orderkey_single { my ( $self, $value, $session, $langid, $dataset ) = @_; # convert to upper case ASCII my $orderkey = uc( unidecode( $value ) ); # ignore apostrophes and hyphens $orderkey =~ s/['-]//g; return $orderkey } Kind regards Mark Mark Gregson | Applications and Development Team Leader -----Original Message----- From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Mario Beaudoin Sent: Tuesday, 18 December 2012 6:13 AM To: eprints-tech@ecs.soton.ac.uk Subject: [EP-tech] Sort result by author, by title Hello I use eprints 3.3.7 in dev server and 3.2.9 in production and i notice then both when we use a french accent in the authors name the sort do not use utf8_general _ci to sort correctly the é goes after the z letter (like we use utf8_bin) (in browse by author and in sort by author or title after search) i look in the sql table eprint_ordervalue_fr creators_name the collate is utf8_general_ci that sort perfecly (phpmyadmin) i already have this bug in older version of eprints and to correct the bug i modify utf8_bin to utf8_general_ci who sort everyting correcly after this change but now the table collation is correct so i take a look on view.pl but nothing there to sort i take a look on view.pm who seem to sort the browse by author but i am not sure what to modify exactly Thank for your help look here the Bé... is at the end of B letter http://espace.etsmtl.ca/view/creators/index.B.html or this one whewe É is a new letter after the A http://espace2.etsmtl.ca/view/master_director/index.A-=C9.html Mario *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech *** Archive: http://www.eprints.org/tech.php/ *** EPrints community wiki: http://wiki.eprints.org/ |
- References:
- [EP-tech] Sort result by author, by title
- From: Mario Beaudoin <Mario.Beaudoin@uqtr.ca>
- [EP-tech] Sort result by author, by title
- Prev by Date: [EP-tech] Citation count dataset and import plugins v1.1 released
- Next by Date: [EP-tech] Masking admin email
- Previous by thread: [EP-tech] Sort result by author, by title
- Next by thread: [EP-tech] Citation count dataset and import plugins v1.1 released
- Index(es):