Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Re: Changing subject lines upon reply.
       [not found] <m3znzgti5a.fsf@h110n2fls33o927.telia.com>
@ 2002-05-04  9:15 ` Simon Josefsson
  0 siblings, 0 replies; only message in thread
From: Simon Josefsson @ 2002-05-04  9:15 UTC (permalink / raw)


Ichimusai <ichi@ichimusai.org> writes:

> There are certain clients who do not handle subjects with eight bit
> chars very gracefully.

Eigth bit chars in Subjects are forbidden, so no client should
generate them.

> I was wondering, is someone sitting on a small function that could
> replace all whitespace in the Subject line with exactly one space?
>
> Example:
>   Subject: This is a æsubject line with an 8-bit char in it.
>
> After NS-munging it becomes:
>   Subject: This is a    æsubject line with an 8-bit char in it.
>
> I'd like a function that will go through the string and contract all
> extraneous white space if possible.
>
> Anyone got a suggestion?

Something like the following should work if you run it on the Subject:
contents:

(while (re-search-forward "[ \t\n]+" nil t)
  (replace-match " "))


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-05-04  9:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <m3znzgti5a.fsf@h110n2fls33o927.telia.com>
2002-05-04  9:15 ` Changing subject lines upon reply Simon Josefsson

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).