[Top] [All Lists]

RE: Line Wrapping Question

1996-02-07 20:44:48
On 2/7/96 at 7:43 PM, Sukvinder Singh Gill (Exchange) wrote:
Ned, I believe that your take on QP line wrapping is never
use the line wrapping for text/plain message bodies on
outbound messages, but do so for attachments right?

I hope that's not what Ned meant. If a user wants to send long lines in
text/plain, QP is a good thing. But I don't think that's the central issue

Let's back up a bit and define the problem. The basic thing that you want
is to deal with auto-wrapped text that the user is giving you. The user is
typing with a composition tool which auto-wraps and they desire the same
effect on the remote end. That is, they type a single pargraph without
hitting the return key, and you want the same or similar auto-wrapping
behavior to occur on receipt of such a message. Specifically, the sender
doesn't care particularly how the line breaks appear on the screen of the
recipient, so long as the text is "wrapped nicely".

There is no way to represent the desire to have auto-wrapped text in
text/plain. Text/plain makes no indication about presentation. And since QP
line breaking is not a presentation mechanism either, that doesn't help
you. So, in order to get the desired behavior, you need to go to another
MIME type.

Text/enriched is a good choice here. For users who have a text/enriched
aware agent, the lines will have any inserted CRLFs replaced by spaces, and
text/enriched specifies that lines should be presented properly wrapped.
For those who don't have text/enriched, it is not a problem: If you get a
subtype of text that you don't understand, you're supposed to treat it like
text/plain. That means in the worst case, a user may get the text with
CRLFs where the sender intended just the continuation of the line which
would be wrapped. But since the text/enriched generator is responsible for
inserting those CRLFs, they can be put in a reasonable place, somewhere
less than 80 characters per line.

For text that should not be unwrapped and autowrapped, you simply mark it
as <nofill> in text/enriched.

You could also use a proprietary format which indicates auto-wrapping
presentation. But since there are people who have MIME programs which know
how to do text/enriched, and all that you care about is the line wrapping,
that wouldn't be terribly friendly.

Take a look at the text/enriched draft that Amanda Walker and I wrote which
is about to be released as an RFC. You can find it as:


or an HTML version of the doc at:


It really looks like this is what you want to do.


Pete Resnick <mailto:presnick(_at_)qualcomm(_dot_)com>
QUALCOMM Incorporated
Home: (217)337-1905 / Fax: (217)337-1980

<Prev in Thread] Current Thread [Next in Thread>