From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from math.gatech.edu (euclid.skiles.gatech.edu [130.207.146.50]) by werple.net.au (8.7/8.7.1) with SMTP id OAA12576 for ; Wed, 22 Nov 1995 14:18:33 +1100 (EST) Received: by math.gatech.edu (5.x/SMI-SVR4) id AA16467; Tue, 21 Nov 1995 21:57:01 -0500 Resent-Date: Wed, 22 Nov 95 04:02 MET Old-Return-Path: Message-Id: Date: Wed, 22 Nov 95 04:02 MET To: zsh-workers@math.gatech.edu Subject: beta12: 8-bit-cleanliness Organization: none. Location: Berlin, Germany From: Thorsten Meinecke Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Resent-Message-Id: <"Yo_Vu1.0.D14.z5fim"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/630 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Missing 8-bit-cleanliness especially WRT filename generation. It was in zsh up to the release of 2.6-beta10. Imagine the names of your working files deliberately scattered with extended characters from i.e. the ISO-8859-1 character set. With beta12 this results in mysteriously disappearing command lines, and worse, infinite loops in the lexer, when completion is requested upon one of those names. Tracking that down led to a dubious (unsigned) cast in input.c, present since rev. 1.5. It does the same as (int)(unsigned int). But we want the effect of (int)(unsigned char) instead: *** 1.7 1995/11/16 03:08:25 --- input.c 1995/11/22 01:08:49 *************** *** 127,133 **** if (inbufleft) { inbufleft--; inbufct--; ! return lastc =3D (unsigned)*inbufptr++; } /* * No characters in input buffer. --- 127,133 ---- if (inbufleft) { inbufleft--; inbufct--; ! return lastc =3D (unsigned char)*inbufptr++; } /* * No characters in input buffer. After fixing this one might start to wonder about the metamorphoses these 8-bit-characters are subjected to, notably in prompt and history: aglaia% mkdir zsh\ =FCber\ alles aglaia% history 1 mkdir zsh\ ^=BCber\ alles 2 history aglaia% !1:s/mkdir/cd cd zsh\ =FCber\ alles aglaia% print -lP '%c' zsh ^=FCber alles Regards, --Thorsten (set { bottle, of beer, on the wall};set {{100..2}$1s,1$1,no more$1s}{$2$3. ,$2$3\, ,"$2.\nTake one down, pass it around, "};echo -n ${(j::)@[2,301]})