[libconfig-model-dpkg-perl] 22/27: Scanner: expect utf-8 from licensecheck
dod at debian.org
dod at debian.org
Mon Jan 12 07:09:50 UTC 2015
This is an automated email from the git hooks/post-receive script.
dod pushed a commit to branch master
in repository libconfig-model-dpkg-perl.
commit 71478c2b1cebb1d207cc21d80a1d85403157e793
Author: Dominique Dumont <dod at debian.org>
Date: Mon Jan 5 20:49:43 2015 +0100
Scanner: expect utf-8 from licensecheck
---
lib/Dpkg/Copyright/Scanner.pm | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/lib/Dpkg/Copyright/Scanner.pm b/lib/Dpkg/Copyright/Scanner.pm
index 2fe451b..5eaa709 100644
--- a/lib/Dpkg/Copyright/Scanner.pm
+++ b/lib/Dpkg/Copyright/Scanner.pm
@@ -42,6 +42,7 @@ my $merge_same_license = $ENV{'merge_same_license'} || "";
sub print_copyright {
my @copyright_data = scan_files();
+ binmode(STDOUT, ":utf8");
foreach my $data (@copyright_data) {
my ($paths, $c, $l) = $data->@*;
@@ -57,6 +58,7 @@ sub print_copyright {
sub scan_files {
my $pipe = IO::Pipe->new();
$pipe->reader("licensecheck --copyright -m -r .");
+ binmode($pipe, ":utf8");
my %copyrights ;
my $files = {};
@@ -294,6 +296,13 @@ Example:
],
]
+=head1 Encoding
+
+The output of L<licensecheck> is expected to be utf-8. Which means
+that the source files scanned by L<licensecheck> should also be
+encoded in utf-8. In practice, this will impact only copyright owner
+name which may be garbled if comments are not encoded in utf-8.
+
=head1 BUGS
Extracting license and copyright data from unstructured comments is not reliable.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libconfig-model-dpkg-perl.git
More information about the Pkg-perl-cvs-commits
mailing list