Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: beta12: 8-bit-cleanliness
- X-seq: zsh-workers 634
- From: Zefram <A.Main@xxxxxxxxxxxxxxxxx>
- To: P.Stephenson@xxxxxxxxxxxxx
- Subject: Re: beta12: 8-bit-cleanliness
- Date: Wed, 22 Nov 1995 13:13:10 +0000 (GMT)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <22090.9511220933@xxxxxxxxxxxxxxxx> from "P.Stephenson@xxxxxxxxxxxxx" 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author