Gnus development mailing list
 help / color / mirror / Atom feed
* Re: 8bit mails via POP and IMAP mail-source
  2000-08-09 13:56 ` simon
@ 2000-08-04 17:29   ` Pavel Janík ml.
  2000-08-09 18:41     ` simon
  2000-08-09 14:39   ` Kai Großjohann
  2000-08-09 15:11   ` Stainless Steel Rat
  2 siblings, 1 reply; 8+ messages in thread
From: Pavel Janík ml. @ 2000-08-04 17:29 UTC (permalink / raw)


   From: simon@josefsson.org
   Date: 09 Aug 2000 15:56:10 +0200

Hi Simon,

   > Does it work?  (Assuming asking the user for character sets can be
   > regarded as "work".  Should the variable, and the one in pop3.el,
   > default to 'raw-text instead?)

if we assume, that "work" means exactly what you wrote, it did not
work. But yes, it does exactly waht I wanted - it did not asked me about
coding-system and wrote it as is and it is readable in the article buffer
now.
-- 
Pavel Janík ml.
Pavel@Janik.cz
http://www.janik.cz



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

* 8bit mails via POP and IMAP mail-source
@ 2000-08-09 13:27 Pavel Janík ml.
  2000-08-09 13:56 ` simon
  0 siblings, 1 reply; 8+ messages in thread
From: Pavel Janík ml. @ 2000-08-09 13:27 UTC (permalink / raw)


Hi.

I have just tried to fetch the same mail (only one line of czech 8bit
characters) from the same server via POP3 and IMAP mailsource:

(setq mail-sources '((imap :server "BigPenguin.inet.cz"
                            :user "p")))

POP3: I have changed only imap to pop.

The mail when got via POP revealed the dialog about the character set which
Emacs should use to store it:

The following default coding systems were tried,
but none of them safely encode the target text:
  iso-8859-2
Select one from the following safe coding systems:
  raw-text emacs-mule

I choosed raw-text. Mail is then correctly displayed in the summary buffer.

Via IMAP, the mail is stored in \202X/202Y and is then viewed as such :-(
Is this a bug in imap.el or somewhere else?
-- 
Pavel Janík ml.
Pavel@Janik.cz
http://www.janik.cz



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

* Re: 8bit mails via POP and IMAP mail-source
  2000-08-09 13:27 8bit mails via POP and IMAP mail-source Pavel Janík ml.
@ 2000-08-09 13:56 ` simon
  2000-08-04 17:29   ` Pavel Janík ml.
                     ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: simon @ 2000-08-09 13:56 UTC (permalink / raw)
  Cc: ding

Pavel@Janik.cz (Pavel Janík ml.) writes:

> Via IMAP, the mail is stored in \202X/202Y and is then viewed as such :-(

`coding-system-for-write' seem to be bound to nil in pop3.el, here's a
similar (untested) patch for mail-source.el.

Does it work?  (Assuming asking the user for character sets can be
regarded as "work".  Should the variable, and the one in pop3.el,
default to 'raw-text instead?)

Index: mail-source.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/mail-source.el,v
retrieving revision 5.38
diff -w -u -u -w -r5.38 mail-source.el
--- mail-source.el	2000/05/15 14:14:42	5.38
+++ mail-source.el	2000/08/04 13:53:48
@@ -649,6 +649,9 @@
   (autoload 'imap-list-to-message-set "imap")
   (autoload 'nnheader-ms-strip-cr "nnheader"))
 
+(defvar mail-source-imap-file-coding-system nil
+  "Coding system for the crashbox made by `mail-source-fetch-imap'.")
+
 (defun mail-source-fetch-imap (source callback)
   "Fetcher for imap sources."
   (mail-source-bind (imap source)
@@ -662,7 +665,7 @@
 		user (or (cdr (assoc from mail-source-password-cache))
 			 password) buf)
 	       (imap-mailbox-select mailbox nil buf))
-	  (let (str (coding-system-for-write 'binary))
+	  (let (str (coding-system-for-write mail-source-imap-file-coding-system))
 	    (with-temp-file mail-source-crash-box
 	      ;; remember password
 	      (with-current-buffer buf




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

* Re: 8bit mails via POP and IMAP mail-source
  2000-08-09 13:56 ` simon
  2000-08-04 17:29   ` Pavel Janík ml.
@ 2000-08-09 14:39   ` Kai Großjohann
  2000-08-09 18:45     ` simon
  2000-08-09 15:11   ` Stainless Steel Rat
  2 siblings, 1 reply; 8+ messages in thread
From: Kai Großjohann @ 2000-08-09 14:39 UTC (permalink / raw)
  Cc: Pavel Janík ml., ding

On 09 Aug 2000, simon@josefsson.org wrote:

> Does it work?  (Assuming asking the user for character sets can be
> regarded as "work".  Should the variable, and the one in pop3.el,
> default to 'raw-text instead?)

Well, the code which reads the crashbox should be adjusted to use the
same coding system that's used for writing it.  I don't know what the
crashbox reading code does...

kai
-- 
I like BOTH kinds of music.



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

* Re: 8bit mails via POP and IMAP mail-source
  2000-08-09 13:56 ` simon
  2000-08-04 17:29   ` Pavel Janík ml.
  2000-08-09 14:39   ` Kai Großjohann
@ 2000-08-09 15:11   ` Stainless Steel Rat
  2 siblings, 0 replies; 8+ messages in thread
From: Stainless Steel Rat @ 2000-08-09 15:11 UTC (permalink / raw)


* simon@josefsson.org  on Wed, 09 Aug 2000
| `coding-system-for-write' seem to be bound to nil in pop3.el, here's a
| similar (untested) patch for mail-source.el.

coding-system-for-read and coding-system-for-write should be binary, not
nil.
-- 
Rat <ratinox@peorth.gweep.net>    \ Happy Fun Ball contains a liquid core,
Minion of Nathan - Nathan says Hi! \ which, if exposed due to rupture, should
PGP Key: at a key server near you!  \ not be touched, inhaled, or looked at.




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

* Re: 8bit mails via POP and IMAP mail-source
  2000-08-04 17:29   ` Pavel Janík ml.
@ 2000-08-09 18:41     ` simon
  0 siblings, 0 replies; 8+ messages in thread
From: simon @ 2000-08-09 18:41 UTC (permalink / raw)
  Cc: ding

Pavel@Janik.cz (Pavel Janík ml.) writes:

>    > Does it work?  (Assuming asking the user for character sets can be
>    > regarded as "work".  Should the variable, and the one in pop3.el,
>    > default to 'raw-text instead?)
> 
> if we assume, that "work" means exactly what you wrote, it did not
> work. But yes, it does exactly waht I wanted - it did not asked me about
> coding-system and wrote it as is and it is readable in the article buffer
> now.

Does setting `mail-source-imap-file-coding-system' to `binary' "work"
or "do what you want"?   I gather `binary' is a better default value.




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

* Re: 8bit mails via POP and IMAP mail-source
  2000-08-09 14:39   ` Kai Großjohann
@ 2000-08-09 18:45     ` simon
  2000-08-09 20:49       ` Stainless Steel Rat
  0 siblings, 1 reply; 8+ messages in thread
From: simon @ 2000-08-09 18:45 UTC (permalink / raw)
  Cc: Pavel Janík ml., ding

Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> Well, the code which reads the crashbox should be adjusted to use the
> same coding system that's used for writing it.  I don't know what the
> crashbox reading code does...

It's read with `raw-text'.

I guess the default for `mail-source-imap-file-coding-system' should
be `raw-text' then?  `binary' and `raw-text' are equal, I think,
modulo eol character, so let's see if `binary' work.




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

* Re: 8bit mails via POP and IMAP mail-source
  2000-08-09 18:45     ` simon
@ 2000-08-09 20:49       ` Stainless Steel Rat
  0 siblings, 0 replies; 8+ messages in thread
From: Stainless Steel Rat @ 2000-08-09 20:49 UTC (permalink / raw)


* simon@josefsson.org  on Wed, 09 Aug 2000
| I guess the default for `mail-source-imap-file-coding-system' should
| be `raw-text' then?  `binary' and `raw-text' are equal, I think,
| modulo eol character, so let's see if `binary' work.

No, they are not equal.  raw-text treats data as text, which is wrong.
binary is the closest thing Emacs has to being able to treat a data stream
as a data stream, which is what you want to happen.
-- 
Rat <ratinox@peorth.gweep.net>    \ Do not use Happy Fun Ball on concrete.
Minion of Nathan - Nathan says Hi! \ 
PGP Key: at a key server near you!  \ 




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

end of thread, other threads:[~2000-08-09 20:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-09 13:27 8bit mails via POP and IMAP mail-source Pavel Janík ml.
2000-08-09 13:56 ` simon
2000-08-04 17:29   ` Pavel Janík ml.
2000-08-09 18:41     ` simon
2000-08-09 14:39   ` Kai Großjohann
2000-08-09 18:45     ` simon
2000-08-09 20:49       ` Stainless Steel Rat
2000-08-09 15:11   ` Stainless Steel Rat

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