Subject: Re: Can Mail be used to affect the reader's program's character interpretation?

From: Joe Brennan <[email-masked]>
Date: Thu, 28 Mar 96 10:30:11 EST

I'm surprised that Pine makes a special case of passing the escape
through (see ttyout.c, stanza on if(ch == '\033'), in 3.91).  

At Columbia we found we had to modify Pine and a few others to display
character "?" for escape, in response to repeated user problems with
terminals locking up or being set to weird displays.  In Pine, if the
escape is in the From or Subject lines, user cannot even see the index
of messages because of the screen disruption.

Joseph Brennan     Academic Information Systems
                   Columbia University in the City of New York
                   [email-masked]

---

From: Mike Brudenell <[email-masked]>
Date: Thu, 28 Mar 1996 17:51:40 +0000 (GMT)

Pine 3.92 defaults to suppressing this for "certain control characters",
under the control of a new configuration variable.  Here's the extract
from the on-line help:

        FEATURE: pass-control-characters-as-is

This feature controls how certain characters contained in messages are
displayed.  If set, all characters in a message will be sent to the
screen.  Normally, control characters are automatically suppressed in
order to avoid inadvertently changing terminal setup parameters.

<End of help on this topic>

Cheers,

Mike Brudenell                                         <[email-masked]>
------------------------------------------------------------------------
The Computing Service, University of York, Heslington, York, YO1 5DD, UK
Tel: +44-1904-433811  FAX: +44-1904-433740  http://www.york.ac.uk/~pmb1/

---

From: kremžská HOŘČICE <[email-masked]>
Date: Fri, 29 Mar 1996 06:04:29 +0200

> through (see ttyout.c, stanza on if(ch == '\033'), in 3.91).

    I'm guessing the reason for this is to handle charset switching for
ISO-2022-based MIME charsets which make use of an ESC sequence for
altering the user's display.  This would be one example of a constructive
use of special characters to affect the user's display.

    To the poser of the original question, so you want a constructive
assignment to make use of this principle?
    Get a pencil and paper.  Look through the man pages for X, or
reference books (O'Reilly), and make note of the sequence of characters
which can be used to change the font used by an xterm.  My memory tells me
that a ^G is used in it, but I have no reference at hand.
    Read the Pine3.92 notes on display filters.  Pay attention to the
CHARSET parameter.
    Write a simple program which outputs to the display, one of several
control sequences to change the font used in the Pine xterm, depending on
the charset of the message to be displayed.
    For extra credit, allow the user to specify the mapping from a charset
value to a desired font, and determine whether the user is using an xterm
Pine or not (won't work if Pine is not in an xterm).
    There.  How's that for something constructive?  I'm sure there will be
a lot of Pine users who will be very happy to use your manipulation of the
characters displayed on the screen.  Like me.  I'm too laz^H^H^Hbusy to
write something like this myself.

> terminals locking up or being set to weird displays.

On 28 Mar 1996, Mike Brudenell wrote:

> under the control of a new configuration variable.

    From the limited testing I've done on the limited platforms available
to me, it seems that 3.92's idea of ``certain control characters'' also
includes most or all of the range of 8th-bit-set ISO control characters;
that is, 128 through 159 decimal, =80 through =9F in MIME Q-P (hex).

    Will these characters perform the same mischief as their corresponding
7-bit control characters (0-31 decimal) when passed to the terminal?

    As it turns out, these characters are printing characters in some
registered MIME character sets, including the PC-based KOI8-R (Russian
Cyrillic) and VISCII (Vietnamese).  What I have been seeing by default
with characters in this range are that they are replaced by the ``?''
character.  This may also extend to the PC versions of Pine which use DOS
code pages which are notorious for using this range of characters as
printing characters.

    The Pine authors are aware of these problems and some other
limitations on use of 8-bit characters, and I confess that I have not
thoroughly examined the results of all settings on the display that
results, nor whether the user's charset value affects the behavior of Pine
in any way.  These will not affect the majority of Pine users in the US or
in western Europe (PC-Pine a possible exception), but may be of concern to
Russian and other users.

    The question I ponder is whether it's appropriate to treat by default
those characters 128-159 as control characters, which is presumably safer
for displays, or as printing characters in the default, which would
accommodate non-ISO-8859-based MIME character sets without requiring the
user to configure anything.

Barry Bouwsma
Radio Praha