Gnus development mailing list
 help / color / mirror / Atom feed
* bug in latest gnus when previewing certain message
@ 2003-05-25 15:55 Vladimir Volovich
  2003-05-26  8:19 ` Simon Josefsson
       [not found] ` <basjcm$28e$1@quimby.gnus.org>
  0 siblings, 2 replies; 4+ messages in thread
From: Vladimir Volovich @ 2003-05-25 15:55 UTC (permalink / raw)


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

Hi,

using the latest gnus from cvs, i get the following error when trying to
view the attached (spam) message:

Debugger entered--Lisp error: (args-out-of-range 650 650)
  mm-decode-coding-region(650 650 koi8-r)
  mail-decode-encoded-word-region(1 883)
  article-decode-encoded-words()
  run-hooks(gnus-article-decode-hook)
  gnus-request-article-this-buffer(860 "nnimap+info:spam")
  gnus-article-prepare(860 nil)
  gnus-summary-display-article(860 nil)
  gnus-summary-select-article(nil force)
  gnus-summary-show-article(nil)
  call-interactively(gnus-summary-show-article)

somehow it contains some strange characters which gnus "doesn't like":
i have no problem previewing similar messages with ISO-2022-JP charset.

Best,
v.

  --- the forwarded message follows ---

[-- Attachment #2: Type: message/rfc822, Size: 2401 bytes --]

From: "ニシキノネット FC事業部 " <n-net@rio.odn.ne.jp>
To: vvv@vsu.ru
Subject: 男女交際業システム『であい君』の御案内
Date: Wed, 07 Nov 2001 13:38:05 +0900
Message-ID: <20011107.0438040930@n-net-rio.odn.ne.jp>


  元手が不要で、パソコン1つで男女交際業を開業出来る
ような画期的な運営システムを開発致しました。
 ニシキノネットが開発した、新しいスタイルの男女交際
業システム『であい君ビジネスツール』でビッグに儲けて
みませんか?
 男女交際業の難しいところは、何と言っても女性会員の
募集及び確保です。『であい君ビジネスツール』システム
は、これまでの男女交際業システムの常識を超えた、女性
会員確保に全く経費の掛からない優れたシステムです。
  報酬は、副業として開業される場合は毎月15〜20万円程
です。本業として開業される場合は70〜100万円程になりま
す。どれだけ儲けられるかは個人差がありますので一概に
は言えませんが、元手が不要ですので損はしません。
 副業として開業されるのも良いでしょうし、本格的に広
告を出して本業として開業されるのも良いでしょう。
 基本的なノウハウと事業に使用する各種雛型メール、出
会い系掲示板にアクセスされている方へ一斉送信するDM用
メールアドレス、出会い系掲示板URL等の、このビジネスに
必要なアイテムは全てニシキノネットが用意致します。
 オーナーさんが1人立ちされるまで、メールや直接のお
電話等で責任を持って指導致します。
 サイドビジネスにされたい方、本格的に運営されたい方、
どうかお気軽にお問い合わせ下さい。
 件名に、詳細希望と明記して送信して頂ければ折り返し
詳細メールを返信致します。本文は何も書かなくて結構で
す。件名に「詳細希望」だけで構いません。

      n-net@rio.odn.ne.jp



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

* Re: bug in latest gnus when previewing certain message
  2003-05-25 15:55 bug in latest gnus when previewing certain message Vladimir Volovich
@ 2003-05-26  8:19 ` Simon Josefsson
       [not found] ` <basjcm$28e$1@quimby.gnus.org>
  1 sibling, 0 replies; 4+ messages in thread
From: Simon Josefsson @ 2003-05-26  8:19 UTC (permalink / raw)
  Cc: ding, bugs

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

> Hi,
>
> using the latest gnus from cvs, i get the following error when trying to
> view the attached (spam) message:
>
> Debugger entered--Lisp error: (args-out-of-range 650 650)
>   mm-decode-coding-region(650 650 koi8-r)
>   mail-decode-encoded-word-region(1 883)

This seems to fix it, but someone familiar with rfc2047.el better check.

--- rfc2047.el.~6.52.~	Thu May 22 22:39:53 2003
+++ rfc2047.el	Mon May 26 10:18:38 2003
@@ -612,7 +612,7 @@
 	    (goto-char e)
 	    (while (re-search-forward "[\n\r]+" nil t)
 	      (replace-match " "))
-	    (goto-char (point-max)))
+	    (setq b (goto-char (point-max))))
 	  (when (and (mm-multibyte-p)
 		     mail-parse-charset
 		     (not (eq mail-parse-charset 'us-ascii))




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

* Re: bug in latest gnus when previewing certain message
       [not found] ` <basjcm$28e$1@quimby.gnus.org>
@ 2003-05-26 17:26   ` Jesper Harder
       [not found]     ` <rzqel2iiub6.fsf@albion.dl.ac.uk>
  0 siblings, 1 reply; 4+ messages in thread
From: Jesper Harder @ 2003-05-26 17:26 UTC (permalink / raw)
  Cc: Vladimir Volovich, bugs

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

Simon Josefsson <jas@extundo.com> writes:

> "Vladimir Volovich" <vvv@vsu.ru> writes:
>
>> using the latest gnus from cvs, i get the following error when trying to
>> view the attached (spam) message:
>>
>> Debugger entered--Lisp error: (args-out-of-range 650 650)
>>   mm-decode-coding-region(650 650 koi8-r)
>>   mail-decode-encoded-word-region(1 883)
>
> This seems to fix it, but someone familiar with rfc2047.el better check.

I think this change is the culprit:

,----
| 2003-05-02  Dave Love  <fx@gnu.org>
| 
| 	* rfc2047.el (rfc2047-q-encode-region, rfc2047-decode): Use
| 	mm-with-unibyte-current-buffer.
`----

I.e. `mm-with-unibyte-current-buffer-mule4' was changed to
`mm-with-unibyte-current-buffer' which isn't equivalent -- the latter
makes the current buffer unibyte which the former doesn't in Mule > 4.

This patch fixes it.  But I never understood what the mule4 stuff was
about, so it might break on Emacsen that use that.  

Which Emacs versions use Mule version 4, by the way?  Maybe we don't
need to support it anymore?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: rfc2047.el.diff --]
[-- Type: text/x-patch, Size: 1039 bytes --]

--- gnus/lisp/rfc2047.el	Wed May 21 16:53:23 2003
+++ rfc2047.el	Mon May 26 19:18:06 2003
@@ -697,18 +697,17 @@
 		 mail-parse-charset)
 	(setq cs mail-parse-charset))
       ;; Fixme: What's this for?  The following comment makes no sense. -- fx
-      (mm-with-unibyte-current-buffer
-	;; In Emacs Mule 4, decoding UTF-8 should be in unibyte mode.
-	(mm-decode-coding-string
-	 (cond
-	  ((equal "B" encoding)
-	   (base64-decode-string
-	    (rfc2047-pad-base64 string)))
-	  ((equal "Q" encoding)
-	   (quoted-printable-decode-string
-	    (mm-replace-chars-in-string string ?_ ? )))
-	  (t (error "Invalid encoding: %s" encoding)))
-	 cs)))))
+      ;; In Emacs Mule 4, decoding UTF-8 should be in unibyte mode.
+      (mm-decode-coding-string
+       (cond
+	((equal "B" encoding)
+	 (base64-decode-string
+	  (rfc2047-pad-base64 string)))
+	((equal "Q" encoding)
+	 (quoted-printable-decode-string
+	  (mm-replace-chars-in-string string ?_ ? )))
+	(t (error "Invalid encoding: %s" encoding)))
+       cs))))
 
 (provide 'rfc2047)
 

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

* Re: bug in latest gnus when previewing certain message
       [not found]     ` <rzqel2iiub6.fsf@albion.dl.ac.uk>
@ 2003-05-30  2:52       ` Jesper Harder
  0 siblings, 0 replies; 4+ messages in thread
From: Jesper Harder @ 2003-05-30  2:52 UTC (permalink / raw)
  Cc: bugs, Vladimir Volovich

Dave Love <d.love@dl.ac.uk> writes:

> Jesper Harder <harder@myrealbox.com> writes:
>
>>> "Vladimir Volovich" <vvv@vsu.ru> writes:
>>>
>>>> using the latest gnus from cvs, i get the following error when trying to
>>>> view the attached (spam) message:
>>>>
>>>> Debugger entered--Lisp error: (args-out-of-range 650 650)
>>>>   mm-decode-coding-region(650 650 koi8-r)
>>>>   mail-decode-encoded-word-region(1 883)
>>
>> I think this change is the culprit:
>>
>> ,----
>> | 2003-05-02  Dave Love  <fx@gnu.org>
>> | 
>> | 	* rfc2047.el (rfc2047-q-encode-region, rfc2047-decode): Use
>> | 	mm-with-unibyte-current-buffer.
>> `----
>
> I don't see how that change could cause the error above.

It's some kind of bad interaction between narrowing and
`mm-with-unibyte-current-buffer'.  This example illustrates the
effect:

(with-temp-buffer
  (insert "From: ニシキノネット FC事業部
Content-Type: text/plain; charset=ISO-2022-JP\n\n")
  (article-narrow-to-head)
  (mm-with-unibyte-current-buffer)
  (buffer-string))

=>
"From: ニシキノネット FC事業部
Content-Type: text/plain"

Note how the last part of the text has been chopped off.  

If you edebug `rfc2047-decode' and step through Vladimirs example,
you'll see that this is also what's happening there.



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

end of thread, other threads:[~2003-05-30  2:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-25 15:55 bug in latest gnus when previewing certain message Vladimir Volovich
2003-05-26  8:19 ` Simon Josefsson
     [not found] ` <basjcm$28e$1@quimby.gnus.org>
2003-05-26 17:26   ` Jesper Harder
     [not found]     ` <rzqel2iiub6.fsf@albion.dl.ac.uk>
2003-05-30  2:52       ` Jesper Harder

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