Gnus development mailing list
 help / color / mirror / Atom feed
* rfc2047-decode-string
@ 2000-11-09 20:50 Vladimir Volovich
  2000-11-09 21:25 ` rfc2047-decode-string ShengHuo ZHU
  0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Volovich @ 2000-11-09 20:50 UTC (permalink / raw)


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?

	Best regards, -- Vladimir.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: rfc2047-decode-string
  2000-11-09 20:50 rfc2047-decode-string Vladimir Volovich
@ 2000-11-09 21:25 ` ShengHuo ZHU
  0 siblings, 0 replies; 2+ messages in thread
From: ShengHuo ZHU @ 2000-11-09 21:25 UTC (permalink / raw)


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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-11-09 21:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-09 20:50 rfc2047-decode-string Vladimir Volovich
2000-11-09 21:25 ` rfc2047-decode-string ShengHuo ZHU

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