Re: Pattern replacement fails if string contains multibyte characters

2007-09-28 Thread Chet Ramey
I wrote: > The difference is in the gnu libc implementation of strcoll(), which bash > uses to compare characters for range matching. The glibc implementation > ignores the locale; the other systems incorporate the current locale's > collating sequence into their strcoll implementation. Sorry, t

Re: Pattern replacement fails if string contains multibyte characters

2007-09-28 Thread Andreas Schwab
Bernd Eggink <[EMAIL PROTECTED]> writes: > This happens on a utf-8 based system (CRUX 2.3), LANG=de_DE.UTF-8: > > t="123abc456äöüABCD" > echo ${t//[a-c]/} > # output: 123456öüCD Which is correct. [a-c] matches every character between a and c (inclusive) in the collating sequence defined by the l

Re: Pattern replacement fails if string contains multibyte characters

2007-09-28 Thread Chet Ramey
Bernd Eggink wrote: > This happens on a utf-8 based system (CRUX 2.3), LANG=de_DE.UTF-8: > > t="123abc456äöüABCD" > echo ${t//[a-c]/} > # output: 123456öüCD > # (should be: "123456äöüABCD") > > echo ${t//[!a-c]/} > # output: abcäAB > # (should be: "abc") > > bash --version: > GNU bash, version 3