Re: Infinite loop in globbing

2011-03-15 Thread Roman Rakus
On 03/14/2011 07:36 PM, Chet Ramey wrote: Here's a minimal patch. Chet Thanks. It is working. I mean no infinite loop. RR

Re: Infinite loop in globbing

2011-03-14 Thread Chet Ramey
On 3/14/11 5:00 AM, Roman Rakus wrote: > $ locale > LANG=en_US.UTF-8 > LC_CTYPE="en_US.UTF-8" > LC_NUMERIC="en_US.UTF-8" > LC_TIME="en_US.UTF-8" > LC_COLLATE="en_US.UTF-8" > LC_MONETARY="en_US.UTF-8" > LC_MESSAGES="en_US.UTF-8" > LC_PAPER="en_US.UTF-8" > LC_NAME="en_US.UTF-8" > LC_ADDRESS="en_US.UT

Re: Infinite loop in globbing

2011-03-14 Thread Micah Cowan
On 03/14/2011 10:06 AM, Chet Ramey wrote: >> On 03/14/2011 07:55 AM, Chet Ramey wrote: >>> The question is how to best handle it: punt immediately, or just treat it >>> as a single-byte character and move on. >> >> I vote single-byte character; after all, it's possible for a filename to >> contain

Re: Infinite loop in globbing

2011-03-14 Thread Chet Ramey
> On 03/14/2011 07:55 AM, Chet Ramey wrote: > > The question is how to best handle it: punt immediately, or just treat it > > as a single-byte character and move on. > > I vote single-byte character; after all, it's possible for a filename to > contain that character, regardless of what your local

Re: Infinite loop in globbing

2011-03-14 Thread Micah Cowan
On 03/14/2011 07:55 AM, Chet Ramey wrote: > The question is how to best handle it: punt immediately, or just treat it > as a single-byte character and move on. I vote single-byte character; after all, it's possible for a filename to contain that character, regardless of what your locale may be. -

Re: Infinite loop in globbing

2011-03-14 Thread Chet Ramey
> >> $ [$'\xFD'$'\xBA'] > >> ^C > >> > >> The bash 4.2 is in infinite loop. The bash 4.1 work well. > > Can you give more details about the setup here? Does the glob match > > any files or not? > Just need to set some utf8 locales (I guess, tried and using > en_US.UTF-8). It doesn't matter if the

Re: Infinite loop in globbing

2011-03-14 Thread Andreas Schwab
Greg Wooledge writes: > In a NON-utf8 locale Try using a utf8 locale. The problem is that xdupmbstowcs2 fails to handle partial multibyte sequences, where mbsnrtowcs may return zero. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 2

Re: Infinite loop in globbing

2011-03-14 Thread Roman Rakus
On 03/14/2011 02:59 PM, Greg Wooledge wrote: On Mon, Mar 14, 2011 at 10:00:14AM +0100, Roman Rakus wrote: $ locale LANG=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.U

Re: Infinite loop in globbing

2011-03-14 Thread Greg Wooledge
On Mon, Mar 14, 2011 at 10:00:14AM +0100, Roman Rakus wrote: > $ locale > LANG=en_US.UTF-8 > LC_CTYPE="en_US.UTF-8" > LC_NUMERIC="en_US.UTF-8" > LC_TIME="en_US.UTF-8" > LC_COLLATE="en_US.UTF-8" > LC_MONETARY="en_US.UTF-8" > LC_MESSAGES="en_US.UTF-8" > LC_PAPER="en_US.UTF-8" > LC_NAME="en_US.UTF-8"