Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Re: ack may ignore files with multi-byte encodings #129

Closed
wants to merge 1 commit into from

2 participants

anno5 Rob Hoelz
anno5

I think my one-line change to Basic.pm solves the problem I pointed out. It does for me (obviously) and doesn't hurt the existing tests.

I haven't been able to make up a specific test for the rejection of multibyte-encoded files with the given testing framework. There seem to be additional encoding problems that make it hard to use run_ack() for that. So I'm just sending the fix.

Anno

Rob Hoelz
Collaborator

Migrated to ack2 queue.

Rob Hoelz hoelzro closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 13, 2010
  1. anno5

    Changed behavior of needs_line_scan() to accept multi-byte encodings

    anno5 authored
    The change in ack reflects the change in Basic.pm
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 0 deletions.
  1. +1 −0  Basic.pm
  2. +1 −0  ack
1  Basic.pm
View
@@ -123,6 +123,7 @@ sub needs_line_scan {
App::Ack::warn( "$self->{filename}: $!" );
return 1;
}
+ $rc = sysseek($self->{fh}, 0, 1); # position in bytes
return 0 unless $rc && ( $rc == $size );
my $regex = $opt->{regex};
1  ack
View
@@ -2681,6 +2681,7 @@ sub needs_line_scan {
App::Ack::warn( "$self->{filename}: $!" );
return 1;
}
+ $rc = sysseek($self->{fh}, 0, 1); # position in bytes
return 0 unless $rc && ( $rc == $size );
my $regex = $opt->{regex};
Something went wrong with that request. Please try again.