To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.admin.suggestionsOpen lugnet.admin.suggestions in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Administrative / Suggestions / 659
658  |  660
Subject: 
Re: quoted-printable support
Newsgroups: 
lugnet.admin.suggestions, lugnet.admin.nntp
Date: 
Tue, 20 May 2003 22:49:23 GMT
Viewed: 
3664 times
  
In lugnet.admin.suggestions, William R. Ward writes:
You could always use Text::Wrap to reformat anything over 80 characters...

Unfortunately, Text::Wrap doesn't handle mail- and news-style quotations, and
would happily convert:

    > >> >really especially long line of quoted text

to (bad):

    > >> >really especially long line of
    quoted text

instead of to (good):

    > >> >really especially long line of
    > >> >quoted text


The biggest problem is the =3D in Brickshelf URL's.  Even a special
case to change =3D to = would be a huge help.

I agree.


I assumed you would store the message without any changes, and convert
it when displaying the message, perhaps with a cache for performance
if needed.

I actually want to get rid of quoted-printable altogether -- as completely
and as early as possible in the cycle (e.g., as soon as the message is
received) and convert the message back to the way it was originall generated
by the sender.  That way it doesn't get propagated outward through NNTP and
SMTP as quoted-printable, which would be undesirable because not all
newsreaders handle quoted-printable encoding natively.  Some MTAs may even
choke on lines longer than, say, 512 bytes, if they aren't wrapped properly.

Quoted-printable is just a message-transfer encoding.  Old MTAs (message
transfer agents) couldn't handle 8-bit data, so someone came up with quoted-
printable as a way to encode 8-bit data in 7-bit ASCII.

The standard thing to do when converting 'quoted-printable' to '8bit' is to
fix the Content-Transfer-Encoding header:

   (OLD)  Content-Transfer-Encoding: quoted-printable
   (NEW)  Content-Transfer-Encoding: 8bit

and add an informational header saying:

   X-MIME-Autoconverted: from quoted-printable to 8bit by <hostname> id <id>

All an MTA has to do is essentially

   $body =~ s{=\n}{}g;
   $body =~ s{=([0-9A-Fa-f]{2})}{chr(hex($1))}eg;

and regenerate the 'Lines:' header if needed.  The additional step of wrapping
excessively long lines intelligently isn't something an MTA typically does,
AFAIK.

--Todd



Message has 2 Replies:
  Re: quoted-printable support
 
(...) check out Text::Autoformat - it does the right thing. Dan (22 years ago, 21-May-03, to lugnet.admin.suggestions, lugnet.admin.nntp)
  Re: quoted-printable support
 
(...) [...] The additional step of wrapping (...) I was only speaking of the web interface. That's why I didn't cc admin.nntp on my original posting... Any newsreader that can't handle quoted-printable is obsolete and it's the user's problem. (...) (22 years ago, 21-May-03, to lugnet.admin.suggestions, lugnet.admin.nntp)

Message is in Reply To:
  Re: quoted-printable support
 
(...) Yes, I've seen that too. You could always use Text::Wrap to reformat anything over 80 characters... (...) The biggest problem is the =3D in Brickshelf URL's. Even a special case to change =3D to = would be a huge help. (...) I assumed you (...) (22 years ago, 20-May-03, to lugnet.admin.suggestions, lugnet.admin.nntp)

13 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR