[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Comand token too long?
From: |
Karl Hammar |
Subject: |
Re: Comand token too long? |
Date: |
Sun, 14 Aug 2011 10:47:44 +0200 (CEST) |
Reinhold Kainhofer:
> Am Sunday, 14. August 2011, 03:36:05 schrieb Karl Hammar:
> > Works here:
> Doesn't work here on a German Kubuntu system:
...
> > $ echo $LANG
> > C
> $ echo $LANG
> de_AT.UTF-8
$ LANG=de_AT.UTF-8
$ echo 'z:/' | egrep '^(/|[A-z]:/)'
egrep: Das Ende des angegebenen Intervalls ist nicht gültig
$ echo 'z:/' | egrep '^(/|[A-Za-z]:/)'
z:/
$ export LC_ALL=C
$ echo 'z:/' | egrep '^(/|[A-z]:/)'
z:/
$
So that means that this bug is due to collation order, and as
you wrote yesterday the interval should be changed to A-Za-z.
The egrep thing is there to detect if a filename is absolute,
i.e. starting with "/" as in "/usr/bin/true" (unix style), or
"C:/" (or another device letter) as in
"C:/WINDOWS/SYSTEM32/FILE.DLL" (Dos/Windows style).
As written in "man grep":
To obtain the traditional interpretation of bracket
expressions, you can use the C locale by setting the
LC_ALL environment variable to the value C.
we can go around this bug by setting LC_ALL to C.
This bug is fixed in [1]:
- echo "$command_line_filename" | $EGREP '^(/|[A-z]:/)' >&6 \
+ echo "$command_line_filename" | LC_ALL=C $EGREP '^(/|[A-Za-z]:/)' >&6 \
We might go around the bug with the attaced patch (texi2dvi is called
from texi2pdf), but I have not had time to test it.
Regards,
/Karl Hammar
[1] http://ftp.gnu.org/gnu/texinfo/texi2dvi
-----------------------------------------------------------------------
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57
texi2dvi.patch
Description: texi2dvi.patch