Gnus development mailing list
 help / color / mirror / Atom feed
From: ShengHuo ZHU <zsh@cs.rochester.edu>
Subject: Re: rfc2047-decode-string
Date: 09 Nov 2000 16:25:06 -0500	[thread overview]
Message-ID: <2npuk425zh.fsf@tiger.jia.vnet> (raw)
In-Reply-To: <m366lwrhtg.fsf@vvv.vsu.ru>

Vladimir Volovich <vvv@vvv.vsu.ru> writes:

> Hi,
> 
> i received a message in which gnus did not decode the subject.
> it looked like:
> 
> Subject: =?koi8-r?B?UmU6IG1zIG9mZmljZSAyMDAwLCDe1M/CIMXHzy4uLg?=
> 
> i think that perhaps the string is not encoded 100% correctly, -- it
> lacks two figns `==' at the end:
> 
> (rfc2047-decode-string "=?koi8-r?B?UmU6IG1zIG9mZmljZSAyMDAwLCDe1M/CIMXHzy4uLg?=")
> "=?koi8-r?B?UmU6IG1zIG9mZmljZSAyMDAwLCDe1M/CIMXHzy4uLg?="
> (rfc2047-decode-string "=?koi8-r?B?UmU6IG1zIG9mZmljZSAyMDAwLCDe1M/CIMXHzy4uLg==?=")
> "Re: ms office 2000, чтоб его..."
> 
> would it be possible, nevertheless, to make rfc2047-decode-string more
> liberal to this sort of `bugs' in encoded-words?

It is because of base64. 

(base64-decode-string "UmU6IG1zIG9mZmljZSAyMDAwLCDe1M/CIMXHzy4uLg")
=> nil 
or
=> error in Emacs 21

(base64-decode-string "UmU6IG1zIG9mZmljZSAyMDAwLCDe1M/CIMXHzy4uLg==")
=> "Re: ...."

In the base64.el, this has been fixed.

Anyway, I've fixed it in rfc2047 by padding the string.

ShengHuo



      reply	other threads:[~2000-11-09 21:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-09 20:50 rfc2047-decode-string Vladimir Volovich
2000-11-09 21:25 ` ShengHuo ZHU [this message]

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=2npuk425zh.fsf@tiger.jia.vnet \
    --to=zsh@cs.rochester.edu \
    /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).