zsh-workers
 help / color / mirror / code / Atom feed
From: Thorsten Meinecke <kaefer@aglaia.snafu.de>
To: zsh-workers@math.gatech.edu
Subject: beta12: 8-bit-cleanliness
Date: Wed, 22 Nov 95 04:02 MET	[thread overview]
Message-ID: <m0tI5Rm-000026C@aglaia.snafu.DE> (raw)

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]})


             reply	other threads:[~1995-11-22  3:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-11-22  3:02 Thorsten Meinecke [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m0tI5Rm-000026C@aglaia.snafu.DE \
    --to=kaefer@aglaia.snafu.de \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).