From 4368f1be466209937ee2626c395c1bbaaa33a29a Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Tue, 31 Dec 2024 15:29:18 +0100 Subject: git-notify: Use Perl's UTF-8 mode --- libexec/git-notify | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libexec') diff --git a/libexec/git-notify b/libexec/git-notify index 64da7c0..0e50229 100755 --- a/libexec/git-notify +++ b/libexec/git-notify @@ -34,9 +34,12 @@ # use strict; -use Fcntl ':flock'; -use Encode qw(encode decode); +use utf8; +use feature qw(evalbytes unicode_eval unicode_strings); +use open qw(:std :utf8); use Cwd 'realpath'; +use Encode qw(encode); +use Fcntl ':flock'; sub git_config($); sub get_repos_name(); @@ -515,7 +518,6 @@ sub send_commit_notice($$) } $subject .= truncate_str(${$info{"log"}}[0],50); - $_ = decode($info{"encoding"}, $_) for @notice; mail_notification("$info{'committer_name'} <$from_address>", $commitlist_address, $subject, "text/plain; charset=UTF-8", @notice); } -- cgit v1.2.3-74-g34f1