[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#624245: annoying error message in non-C locale

Package: texinfo
Version: 4.13a.dfsg.1-6

The /usr/bin/texi2dvi shell script invokes
  ... | $EGREP '[A-z]' >&6 || ...
on line 1713.  Unless LC_ALL=C, this gives an error.

  $ echo A:/foo/bar | env LC_ALL=C egrep '^(/|[A-z]:/)' || echo error

  $ echo A:/foo/bar | env LC_ALL=  egrep '^(/|[A-z]:/)' || echo error
  egrep: Invalid range end

There are a few ways to fix this.  The invocation could be changed to

  ... | env LC_ALL=C $EGREP '^(/|[A-z]:/)' ...

assuming it really is desired to match any of the following


as in the current code.

Assuming the intent is to match only ASCII alphabetic characters, the
invocation should be

  ... | $EGREP '^(/|[A-Za-z]:/)' ...


  ... | env LC_ALL=C $EGREP '^(/|[[:alpha:]]:/)' ...

Assuming the intent is to match alphabetic characters in the current
locale, the invocation should be

  ... | $EGREP '^(/|[[:alpha:]]:/)' ...

or, better,

  ... | $EGREP '^([[:alpha:]]:|)/' ...


Barak A. Pearlmutter
 Hamilton Institute & Dept Comp Sci, NUI Maynooth, Co. Kildare, Ireland

Reply to: