Re: Case modification fails for Unicode characters

2012-07-13 Thread Andreas Schwab
It _is_ a bash bug. diff --git a/lib/sh/casemod.c b/lib/sh/casemod.c index 3127d8c..d58b216 100644 --- a/lib/sh/casemod.c +++ b/lib/sh/casemod.c @@ -227,8 +227,8 @@ sh_modcase (string, pat, flags) { default: case CASE_NOOP: nwc = wc; break; - case CASE_UPPER:

Re: Overflow Bug

2012-07-13 Thread Greg Wooledge
On Fri, Jul 13, 2012 at 08:53:25AM +0300, Pierre Gaston wrote: > On Thu, Jul 12, 2012 at 8:09 PM, Ernesto Messina > wrote: > > Hello, I think I found an overflow bug. I got the follow C program: > > > > #include > > #include > > > > int main(int argc, char *argv[]) > > { > > char a[10]; > >

Re: Case modification fails for Unicode characters

2012-07-13 Thread Chet Ramey
On 7/13/12 3:39 AM, Andreas Schwab wrote: > It _is_ a bash bug. Thanks for the fix. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRUc...@case.eduhttp://cnswww.cns.cwru.edu/~chet/

Re: [patch #7818] Loop breaks when trying to write to a readonly variable

2012-07-13 Thread Chet Ramey
On 7/13/12 8:53 AM, Daniel Amthor wrote: > URL: > > > Summary: Loop breaks when trying to write to a readonly > variable Yeah, that's an assignment error. Posix says a non-interactive shell should exit in that case and that an interactive

Re: Case modification fails for Unicode characters

2012-07-13 Thread Chet Ramey
On 7/12/12 2:19 PM, Dennis Williamson wrote: > s=łódź; echo "${s^^} ${s~~}"' > łóDź ŁÓDŹ > > The to-upper and the undocumented toggle operators should produce > identical output in this situation, but only the toggle works > correctly. Thanks for the report. Andreas's fix is correct. That will

Re: [patch #7818] Loop breaks when trying to write to a readonly variable

2012-07-13 Thread Chet Ramey
On 7/13/12 11:17 AM, Daniel Amthor wrote: > Chet, > > 2012/7/13 Chet Ramey mailto:chet.ra...@case.edu>> > > On 7/13/12 8:53 AM, Daniel Amthor wrote: > > Yeah, that's an assignment error. Posix says a non-interactive shell > should exit in that case and that an interactive shell shou

Re: [patch #7818] Loop breaks when trying to write to a readonly variable

2012-07-13 Thread Daniel Amthor
Chet, 2012/7/13 Chet Ramey > On 7/13/12 8:53 AM, Daniel Amthor wrote: > > Yeah, that's an assignment error. Posix says a non-interactive shell > should exit in that case and that an interactive shell should write an > error message without exiting. Bash doesn't exit the shell, but it does > ca