zsh-workers
 help / color / mirror / code / Atom feed
From: Zefram <A.Main@dcs.warwick.ac.uk>
To: P.Stephenson@swansea.ac.uk
Cc: zsh-workers@math.gatech.edu
Subject: Re: beta12: 8-bit-cleanliness
Date: Wed, 22 Nov 1995 13:13:10 +0000 (GMT)	[thread overview]
Message-ID: <5178.199511221313@stone.dcs.warwick.ac.uk> (raw)
In-Reply-To: <22090.9511220933@pygmy.swan.ac.uk> from "P.Stephenson@swansea.ac.uk" at Nov 22, 95 09:33:00 am

>hmm.. looks to me like the correct thing is appearing in the history,
>it's just getting messed up on print out.  There's a routine called
>nicefputs() which formats history lines for display:  it does an
>isprint() check on each character.  This returns false for printable
>8-bit characters.  Now, the shell doesn't know whether the terminal
>can print 8-bit characters or not.  But that's not the full problem,
>since for characters over 128 which it doesn't think are printable, it
>just strips off 0x40 and prints it anyway.

Odd, I would have thought isprint() would get it right.

>Here's my suggestion:  assume we can print 8-bit chars, but handle
>anything in the range of control characters + 128 separately by
>sticking \M- in front.  (They're likely to get messed up inside zsh
>anyway; one day they might work, though.)  The following is about the
>best we can easily do.

That's a good solution.  When I modified nicefputs() etc. recently I
deliberately didn't bother handling 8-bit characters, because zsh isn't
8-bit clean.  I would rather have a proper fix, recognising which
characters are *really* printable, but this is a reasonable solution
for unprintable characters.

You'll want to modify nicestrlen() as well.

-zefram


  reply	other threads:[~1995-11-22 13:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-11-22  3:02 Thorsten Meinecke
1995-11-22  9:19 ` Zoltan Hidvegi
1995-11-22  9:33 ` P.Stephenson
1995-11-22 13:13   ` Zefram [this message]
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=5178.199511221313@stone.dcs.warwick.ac.uk \
    --to=a.main@dcs.warwick.ac.uk \
    --cc=P.Stephenson@swansea.ac.uk \
    --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).