Kaydet (Commit) 9c83796f authored tarafından Christian Lohmaier's avatar Christian Lohmaier

lo-commit-stat: default to utf8, adjust regex for tdf bugzilla

Change-Id: I61960512e297417eb096b3bc921974aa43f74ccc
üst 146258f8
......@@ -7,6 +7,9 @@ use strict;
use LWP::UserAgent;
use utf8;
use File::Temp;
use Encode;
use open ':encoding(utf8)';
use open ':std' => ':encoding(utf8)';
my %module_dirname = (
"core" => "",
......@@ -381,19 +384,16 @@ sub get_bug_name($$)
$ua->env_proxy;
my $response = $ua->get($url);
if ($response->is_success) {
my $title = $response->title;
if ( $title =~ s/^Bug \d+ \S+ // ) {
my $title = decode('utf8', $response->title);
if ( $title =~ s/^(?:Bug $bug_number \S+|$bug_number –) // ) {
print "$title\n";
return $title;
} else {
print "warning: not found; using commit message (only got $title)\n";
print "warning: not found; using commit message (only got $title)";
}
} else {
print "\n";
}
} else {
print "\n";
}
print "\n";
return $summary;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment