Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix UTF8 handling in push mode.
  • Loading branch information
sorear committed Jan 5, 2011
1 parent b72de5a commit 39e7ab0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions push.psgi
Expand Up @@ -2,6 +2,7 @@
use 5.010;
use JSON;
use YAML;
use Encode;
use strict;
use warnings;

Expand Down Expand Up @@ -65,6 +66,10 @@ sub report {
if (scalar @files > 1) {
$prefix .= " (" . scalar(@files) . " files)";
}
# JSON lives in the world of characters, sadly, karmalog doesn't
for ($commit->{author}{name}, $project, @lines) {
$_ = Encode::encode_utf8($_);
}
modules::local::karmalog->emit_karma_message(
targets => \@tgt,
user => $commit->{author}{name},
Expand Down

0 comments on commit 39e7ab0

Please sign in to comment.