Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@artzte
Created August 9, 2011 23:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save artzte/1135457 to your computer and use it in GitHub Desktop.
Save artzte/1135457 to your computer and use it in GitHub Desktop.
additional ackmate_ack patch to report source of utf-8 errors
# insert prior to line 2613 / return $buffer =~ /$regex/m;
local $SIG{__WARN__} = sub {
my $e = shift;
App::Ack::warn( "$e\n $self->{filename}:\n\nYou probably want to either convert this file to utf-8, ignore it in ~/.ackrc, or delete it.\n\n" );
return;
};
# end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment