diff --git a/C4/Installer/PerlDependencies.pm b/C4/Installer/PerlDependencies.pm index 2225463349..c2e61ce684 100644 --- a/C4/Installer/PerlDependencies.pm +++ b/C4/Installer/PerlDependencies.pm @@ -617,11 +617,6 @@ our $PERL_DEPS = { required => 0, min_ver => '0.40' }, - 'Text::Unaccent' => { - 'usage' => 'Core', - 'required' => '1', - 'min_ver' => '1.08', - }, 'Test::WWW::Mechanize' => { 'usage' => 'Testing suite', 'required' => '0', diff --git a/Koha/Patron.pm b/Koha/Patron.pm index 69cc297652..f78bdff922 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -23,7 +23,7 @@ use Modern::Perl; use Carp; use List::MoreUtils qw( uniq ); use JSON qw( to_json ); -use Text::Unaccent qw( unac_string ); +use Unicode::Normalize; use C4::Accounts; use C4::Context; @@ -1293,14 +1293,14 @@ sub generate_userid { $firstname =~ s/[[:digit:][:space:][:blank:][:punct:][:cntrl:]]//g; $surname =~ s/[[:digit:][:space:][:blank:][:punct:][:cntrl:]]//g; my $userid = lc(($firstname)? "$firstname.$surname" : $surname); - $userid = unac_string('utf-8',$userid); + $userid = NFKD( $userid ); + $userid =~ s/\p{NonspacingMark}//g; $userid .= $offset unless $offset == 0; $self->userid( $userid ); $offset++; } while (! $self->has_valid_userid ); return $self; - } =head2 Internal methods