[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[lintian] 01/02: Add utf8 layer to STDOUT to avoid mojibake



This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository lintian.

commit ae02a72f8029191dcd41a883b7120ea5bc516ac0
Author: Niels Thykier <niels@thykier.net>
Date:   Sun Jun 19 12:42:40 2016 +0000

    Add utf8 layer to STDOUT to avoid mojibake
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 commands/lintian | 1 +
 debian/changelog | 6 ++++++
 frontend/dplint  | 2 ++
 3 files changed, 9 insertions(+)

diff --git a/commands/lintian b/commands/lintian
index f4388d1..eda64e1 100755
--- a/commands/lintian
+++ b/commands/lintian
@@ -151,6 +151,7 @@ sub timed_task(&);
 
 #turn off file buffering
 STDOUT->autoflush;
+binmode(STDOUT, ':utf8');
 
 # Globally ignore SIGPIPE.  We'd rather deal with error returns from write
 # than randomly delivered signals.
diff --git a/debian/changelog b/debian/changelog
index e995a7e..a0c8d6b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -54,6 +54,9 @@ lintian (2.5.45) UNRELEASED; urgency=medium
   * collection/*:
     + [NT] Always pass "-n" to "gzip".
 
+  * commands/lintian:
+    + [NT] Add ":utf8" layer to STDOUT.  Thanks to Michael
+      Prokop for reporting the issue.  (Closes: #801296)
   * commands/reporting-html-reports.pm:
     + [NT] Remove "$COPY_DOCS" configuration option.  The
       html_reports now always copies the documentation.
@@ -85,6 +88,9 @@ lintian (2.5.45) UNRELEASED; urgency=medium
   * doc/tutorial/Lintian/Tutorial/WritingTests.pod:
     + [JW] Fix formatting error.
 
+  * frontend/dplint:
+    + [NT] Add ":utf8" layer to STDOUT.
+
   * lib/Lintian/DepMap.pm:
     + [JW] Fix typos.
   * lib/Lintian/Tags.pm:
diff --git a/frontend/dplint b/frontend/dplint
index 8c4387c..7f47166 100755
--- a/frontend/dplint
+++ b/frontend/dplint
@@ -206,6 +206,8 @@ sub main {
         'user-dirs!' => $user_dirs,
     );
 
+    binmode(STDOUT, ':utf8');
+
     # init commandline parser
     Getopt::Long::config(
         'bundling', 'no_getopt_compat',

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: