Gnus development mailing list
 help / color / mirror / Atom feed
From: Jesper Harder <harder@myrealbox.com>
Subject: Re: rfc2047.el bug?
Date: Thu, 11 Sep 2003 02:40:57 +0200	[thread overview]
Message-ID: <m3znhcxili.fsf@defun.localdomain> (raw)
In-Reply-To: <b9yfzj5e05y.fsf@jpl.org>

[-- Attachment #1: Type: text/plain, Size: 505 bytes --]

Katsumi Yamaoka <yamaoka@jpl.org> writes:

> Gnus sometimes encodes a Japanese-English mixture text to the
> line length exceeding 76 characters.  For example:
>
> Subject: 寿ju 限ge 無mu 寿ju 限ge 無mu 五go 劫kou
>
> Subject: =?iso-2022-jp?b?GyRCPHcbKEJqdSAbJEI4QhsoQmdlIBskQkw1GyhCbXUgGyRCPHcbKEJqdQ==?=
>  =?iso-2022-jp?b?IBskQjhCGyhCZ2UgGyRCTDUbKEJtdSAbJEI4XhsoQmdvIBskQjllGyhCaw==?=
>  =?iso-2022-jp?b?b3U=?=

Hey, I can make an even worse example :-)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/plain; charset=iso-2022-cn-ext, Size: 853 bytes --]


Subject: ^[$+I^[O!<^[$+M^[O!~^[$+I^[O!<^[$+M^[O!~^[$+I^[O!<^[$+M^[O!~^[$+I^[O!<^[$+M^[O!~^[$+I^[O!<^[$+M^[O!~^[$+I^[O!<^[$+M^[O!~^[$+I^[O!<^[$+M^[O!~^[$+I^[O!<

Subject: =?iso-2022-cn-ext?b?GyQrSRtPITwbJCtNG08hfhskK0kbTyE8GyQrTRtPIX4bJCtJG08hPBskK00bTyF+GyQrSRtPITwbJCtNG08hfhskK0kbTyE8GyQrTRtPIX4bJCtJG08hPBskK00bTyF+GyQrSRtPITwbJCtNG08hfhskK0kbTyE8?=

No less than 191 characters!  Oh boy, this means that we'll have to
split the header for every 4 characters in some cases.

I've checked in a fix.  It

* Assumes a factor 8 worst case expansion for everything with B in
  `rfc2047-charset-encoding-alist' where I didn't know better.  It's
  true for iso-2022-cn-ext -- if someone knows better values for other
  charsets, please fill them in.

* Only fixes the 75 char limit on encoded-words.  It's still possible
  to exceed the 76 char line length limit, although less likely.

  reply	other threads:[~2003-09-11  0:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-10  4:29 Katsumi Yamaoka
2003-09-11  0:40 ` Jesper Harder [this message]
2003-09-11  1:34   ` Katsumi Yamaoka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3znhcxili.fsf@defun.localdomain \
    --to=harder@myrealbox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).