To test:
Make a record with a URL that has a UTF8 character, such as:
http://some.nonexistent.tld/MāoriWomenAotearoa.pdf
Run the check-url-quick.pl job, notice it dies at that URL
Apply this patch
Test again, it should work.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
use C4::Biblio;
use AnyEvent;
use AnyEvent::HTTP;
+use Encode;
my ( $verbose, $help, $html ) = ( 0, 0, 0 );
my ( $host, $host_intranet ) = ( '', '' );
my $url = $field->subfield('u');
next unless $url;
$url = "$host/$url" unless $url =~ /^http/i;
+ $url = encode_utf8($url);
$count++;
http_request(
HEAD => $url,