diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2024-12-31 15:29:18 +0100 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2024-12-31 15:29:18 +0100 |
commit | 4368f1be466209937ee2626c395c1bbaaa33a29a (patch) | |
tree | 98413c3b7e96b757ae30d3dfedc4a01d61e4251f | |
parent | e3140b7d3fc2ca12efea1206f3cf6e051ddee91f (diff) | |
download | site-4368f1be466209937ee2626c395c1bbaaa33a29a.tar.gz |
git-notify: Use Perl's UTF-8 mode
-rwxr-xr-x | libexec/git-notify | 8 |
1 files changed, 5 insertions, 3 deletions
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 @@ | |||
34 | # | 34 | # |
35 | 35 | ||
36 | use strict; | 36 | use strict; |
37 | use Fcntl ':flock'; | 37 | use utf8; |
38 | use Encode qw(encode decode); | 38 | use feature qw(evalbytes unicode_eval unicode_strings); |
39 | use open qw(:std :utf8); | ||
39 | use Cwd 'realpath'; | 40 | use Cwd 'realpath'; |
41 | use Encode qw(encode); | ||
42 | use Fcntl ':flock'; | ||
40 | 43 | ||
41 | sub git_config($); | 44 | sub git_config($); |
42 | sub get_repos_name(); | 45 | sub get_repos_name(); |
@@ -515,7 +518,6 @@ sub send_commit_notice($$) | |||
515 | } | 518 | } |
516 | 519 | ||
517 | $subject .= truncate_str(${$info{"log"}}[0],50); | 520 | $subject .= truncate_str(${$info{"log"}}[0],50); |
518 | $_ = decode($info{"encoding"}, $_) for @notice; | ||
519 | mail_notification("$info{'committer_name'} <$from_address>", $commitlist_address, $subject, | 521 | mail_notification("$info{'committer_name'} <$from_address>", $commitlist_address, $subject, |
520 | "text/plain; charset=UTF-8", @notice); | 522 | "text/plain; charset=UTF-8", @notice); |
521 | } | 523 | } |