zsh-workers
 help / color / mirror / code / Atom feed
* beta12: 8-bit-cleanliness
@ 1995-11-22  3:02 Thorsten Meinecke
  1995-11-22  9:19 ` Zoltan Hidvegi
  1995-11-22  9:33 ` P.Stephenson
  0 siblings, 2 replies; 7+ messages in thread
From: Thorsten Meinecke @ 1995-11-22  3:02 UTC (permalink / raw)
  To: zsh-workers

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 = (unsigned)*inbufptr++;
  	}
  	/*
  	 * No characters in input buffer.
--- 127,133 ----
  	if (inbufleft) {
  	    inbufleft--;
  	    inbufct--;
! 	    return lastc = (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\ über\ alles
  aglaia% history
      1  mkdir zsh\ ^¼ber\ alles
      2  history
  aglaia% !1:s/mkdir/cd
  cd zsh\ über\ alles
  aglaia% print -lP '%c'
  zsh ^über 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]})


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1995-11-25  5:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-11-22  3:02 beta12: 8-bit-cleanliness Thorsten Meinecke
1995-11-22  9:19 ` Zoltan Hidvegi
1995-11-22  9:33 ` P.Stephenson
1995-11-22 13:13   ` Zefram
1995-11-23  9:08     ` Peter Stephenson
1995-11-24 21:29       ` Thorsten Meinecke
1995-11-25  5:00         ` Zefram

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).