From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/33293 Path: main.gmane.org!not-for-mail From: ShengHuo ZHU Newsgroups: gmane.emacs.gnus.general Subject: Re: rfc2047-decode-string Date: 09 Nov 2000 16:25:06 -0500 Sender: owner-ding@hpc.uh.edu Message-ID: <2npuk425zh.fsf@tiger.jia.vnet> References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1035169428 24391 80.91.224.250 (21 Oct 2002 03:03:48 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 03:03:48 +0000 (UTC) Return-Path: Original-Received: from spinoza.math.uh.edu (spinoza.math.uh.edu [129.7.128.18]) by mailhost.sclp.com (Postfix) with ESMTP id 3C747D049A for ; Thu, 9 Nov 2000 16:25:40 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by spinoza.math.uh.edu (8.9.1/8.9.1) with ESMTP id PAB19142; Thu, 9 Nov 2000 15:25:24 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Thu, 09 Nov 2000 15:24:46 -0600 (CST) Original-Received: from mailhost.sclp.com (postfix@66-209.196.61.interliant.com [209.196.61.66] (may be forged)) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id PAA13089 for ; Thu, 9 Nov 2000 15:24:36 -0600 (CST) Original-Received: from zsh.2y.net (d18182925.rochester.rr.com [24.24.41.37]) by mailhost.sclp.com (Postfix) with ESMTP id B5A49D049A for ; Thu, 9 Nov 2000 16:25:01 -0500 (EST) Original-Received: (from zsh@localhost) by zsh.2y.net (8.10.0/8.10.0) id eA9LP6I31391; Thu, 9 Nov 2000 16:25:06 -0500 Original-To: ding@gnus.org X-Attribution: ZSH X-Face: 'IF:e51ib'Qbl^(}l^&4-J`'P!@[4~O|&k#:@Gld#b/]oMq&`&FVY._3+b`mzp~Jeve~/#/ ERD!OTe<86UhyN=l`mrPY)M7_}`Ktt\K+58Z!hu7>qU,i.N7TotU[FYE(f1;}`g2xj!u*l`^&=Q!g{ *q|ddto|nkt"$r,K$[)"|6,elPH= GJ6Q In-Reply-To: Original-Lines: 35 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:33293 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:33293 Vladimir Volovich 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