================================================================
Dear Bug Team!
If your buffer-file-coding-system defaults to something that isn’t
ISO-8859-1 compatible, any non-ASCII characters in your mails will be doubly
encoded when FCCs are written to disk. To reproduce this, you could do the
following;
1. Start xemacs -vanilla.
;; When the transfer encoding is quoted-printable or Base64, the non-ASCII
;; compatible stuff doesn’t gets hit.
2. M-: (setq vm-mime-8bit-text-transfer-encoding 'binary) RET
;; Make the default value for b-f-c-s non-8859-1 compatible
3. M-: (setq-default buffer-file-coding-system 'iso-8859-7) RET
;; Use a MIME-enabled mail client (which would be the default, in an
;; ideal world.
4. M-x vm-mail RET
5. Add an FCC: header (doesn’t matter whether it will create a new file or
not), for example:
FCC: /tmp/random-new-file
6. Paste the Greek text from the HELLO file into it.
7. Send the mail.
8. Examine the FCC’ed file--observe that
C-u C-x C-f /tmp/random-new-file RET iso-8859-7 RET gives you, for example,
Greek (ÅëëçíéêÜ) ÃåéÜ óáò
which, when decoded gives the right text:
(decode-coding-string "Greek (ÅëëçíéêÜ) ÃåéÜ óáò" 'iso-8859-7)
=> "Greek (Ελληνικά) Γειά σας"
Here’s a fix, to be applied to the sendmail.el of the mail-lib package.
--- sendmail.el.orig 2004-11-08 06:16:27.000000000 +0000
+++ sendmail.el 2004-12-28 00:51:03.000000000 +0000
@@ -1225,8 +1225,19 @@
(insert "\n\C-_")
(write-region (point-min) (point-max) (car fcc-list) t)
(erase-buffer)))
- (write-region
- (1+ (point-min)) (point-max) (car fcc-list) t)))
+
+ ;; MIME processing should have eliminated any characters
+ ;; outside the range 0-255; if MIME processing hasn't been
+ ;; done, there's no reasonable expectation that the data will
+ ;; be preserved anyway, so we just write tildes for those
+ ;; chars. We set the coding system for write to 'binary to
+ ;; prevent any double-encoding that may occur if
+ ;; buffer-file-coding-system has been initialised to a
+ ;; non-binary-compatible coding system.
+
+ (let ((coding-system-for-write 'binary))
+ (write-region (1+ (point-min)) (point-max) (car fcc-list) t))))
+
(and buffer (not dont-write-the-file)
(with-current-buffer buffer
(set-visited-file-modtime))))
Bye,
- Aidan
================================================================
System Info to help track down your bug:
---------------------------------------
uname -a: Linux
tweety.build.redhat.com 2.4.21-14.ELsmp #1 SMP Wed Apr 14 18:55:47 EDT
2004 i686 i686 i386 GNU/Linux
./configure 'i386-redhat-linux-gnu' '--prefix=/usr'
'--exec-prefix=/usr' '--bindir=/usr/bin' '--datadir=/usr/share'
'--libdir=/usr/lib' '--mandir=/usr/share/man/man1'
'--infodir=/usr/share/info' '--with-gpm=no' '--with-sound=native'
'--with-pop' '--mail-locking=lockf' '--with-clash-detection'
'--debug=yes' '--with-mule=yes' '--with-database=berkdb'
'--with-ldap=yes' '--with-hesiod=no' '--with-canna=yes'
'--with-wnn=yes' '--with-xim=xlib' '--with-athena=3d'
'--with-widgets=athena' '--with-menubars=lucid'
'--with-scrollbars=lucid' '--with-dialogs=athena' '--with-msw=no'
'--with-xfs=yes' '--pdump'
XEmacs 21.4.13 "Rational FORTRAN" configured for `i386-redhat-linux'.
Compilation / Installation:
Source code location: /usr/src/build/394749-i386/BUILD/xemacs-21.4.13
Installation prefix: /usr
Operating system description file: `s/linux.h'
Machine description file: `m/intel386.h'
Compiler: gcc -O2 -g -pipe -march=i386 -mcpu=i686
Relocating allocator for buffers: no
GNU version of malloc: yes
- Using Doug Lea's new malloc from the GNU C Library.
Window System:
Compiling in support for the X window system:
- X Windows headers location: /usr/X11R6/include
- X Windows libraries location: /usr/X11R6/lib
- Handling WM_COMMAND properly.
Compiling in support for the Athena widget set:
- Athena headers location: X11/Xaw3d
- Athena library to link: Xaw3d
Using Lucid menubars.
Using Lucid scrollbars.
Using Athena dialog boxes.
Using Athena native widgets.
TTY:
Compiling in support for ncurses.
Images:
Compiling in support for GIF images (builtin).
Compiling in support for XPM images.
Compiling in support for PNG images.
Compiling in support for JPEG images.
Compiling in support for TIFF images.
Sound:
Compiling in support for sound (native).
Databases:
Compiling in support for Berkeley database.
Compiling in support for LDAP.
Compiling in support for PostgreSQL.
- Using PostgreSQL header file: libpq-fe.h
- Using PostgreSQL V7 bindings.
Internationalization:
Compiling in support for Mule (multi-lingual Emacs).
Compiling in support for XIM (X11R5+ I18N input method).
- Using raw Xlib to provide XIM support.
- Using XFontSet to provide bilingual menubar.
Compiling in support for Canna on Mule.
Compiling in support for the WNN input method on Mule.
Mail:
Compiling in support for POP mail retrieval.
Compiling in support for "lockf" mail spool file locking method.
Other Features:
Inhibiting IPv6 canonicalization at startup.
Compiling in support for dynamic shared object modules.
Using the new portable dumper.
Compiling in support for extra debugging code.
Load-Path Lisp Shadows:
----------------------
(/home/aidan/emacs-lisp/redo
/usr/share/xemacs/xemacs-packages/lisp/edit-utils/redo
/home/aidan/emacs-lisp/vm-mime
/usr/share/xemacs/xemacs-packages/lisp/vm/vm-mime
/usr/share/xemacs/xemacs-packages/lisp/apel/timezone
/usr/share/xemacs/xemacs-packages/lisp/xemacs-base/timezone
/usr/share/xemacs/xemacs-packages/lisp/build/build-report
/usr/share/xemacs-21.4.13/lisp/build-report
/usr/share/xemacs/xemacs-packages/lisp/apel/alist
/usr/share/xemacs-21.4.13/lisp/alist)
Installed XEmacs Packages:
-------------------------
((zenirc:version 1.13 :type regular)
(xslt-process :version 1.11 :type regular)
(xslide :version 1.08 :type regular)
(xemacs-devel :version 1.58 :type single-file)
(xemacs-base :version 1.78 :type regular)
(w3 :version 1.28 :type regular)
(vm :version 7.14 :type regular)
(viper :version 1.36 :type regular)
(view-process :version 1.12 :type regular)
(vhdl :version 1.17 :type regular)
(vc-cc :version 1.21 :type regular)
(vc :version 1.37 :type regular)
(tramp :version 1.16 :type regular)
(tpu :version 1.12 :type regular)
(tooltalk :version 1.13 :type regular)
(tm :version 1.36 :type regular)
(time :version 1.13 :type regular)
(textools :version 1.14 :type regular)
(text-modes :version 1.63 :type single-file)
(texinfo :version 1.24 :type regular)
(supercite :version 1.19 :type regular)
(strokes :version 1.08 :type regular)
(speedbar :version 1.26 :type regular)
(sounds-wav :version 1.1 :type regular)
(sounds-au :version 1.1 :type regular)
(sml-mode :version 0.09 :type regular)
(slider :version 1.13 :type regular)
(sieve :version 1.13 :type regular)
(sh-script :version 1.17 :type regular)
(sgml :version 1.08 :type regular)
(semantic :version 1.17 :type regular)
(scheme :version 1.13 :type regular)
(sasl :version 1.13 :type regular)
(ruby-modes :version 1.01 :type regular)
(rmail :version 1.13 :type regular)
(reftex :version 1.3 :type regular)
(python-modes :version 1.02 :type single-file)
(psgml-dtds :version 1.02 :type regular)
(psgml :version 1.41 :type regular)
(ps-print :version 1.08 :type regular)
(prog-modes
:version
1
.83
:type
single-file)
(pgg :version 1.03 :type regular)
(perl-modes :version 1.04 :type single-file)
(pcomplete :version 1.02 :type regular)
(pcl-cvs :version 1.64 :type regular)
(pc :version 1.25 :type single-file)
(os-utils :version 1.32 :type single-file)
(oo-browser :version 1.03 :type regular)
(ocaml :version 0.04 :type regular)
(net-utils :version 1.32 :type single-file)
(mmm-mode :version 1.0 :type regular)
(misc-games :version 1.16 :type single-file)
(mine :version 1.14 :type regular)
(mh-e :version 1.23 :type regular)
(mew :version 1.17 :type regular)
(mailcrypt :version 2.12 :type regular)
(mail-lib :version 1.6 :type regular)
(liece :version 1.12 :type regular)
(jde :version 1.45 :type regular)
(ispell :version 1.24 :type regular)
(ilisp :version 1.32 :type regular)
(igrep :version 1.1 :type regular)
(idlwave :version 1.3 :type regular)
(ibuffer :version 1.08 :type regular)
(hyperbole :version 1.12 :type regular)
(hm--html-menus :version 1.21 :type regular)
(haskell-mode :version 1.05 :type regular)
(gnus :version 1.71 :type regular)
(gnats :version 1.15 :type regular)
(games :version 1.14 :type regular)
(fsf-compat :version 1.12 :type single-file)
(frame-icon :version 1.09 :type regular)
(fortran-modes :version 1.02 :type single-file)
(forms :version 1.14 :type regular)
(footnote :version 1.15 :type regular)
(eudc :version 1.38 :type regular)
(eterm :version 1.13 :type regular)
(ess :version 1.04 :type regular)
(eshell :version 1.05 :type regular)
(emerge :version 1.09 :type regular)
(elib :version 1.1 :type single-file)
(eieio :version 1.04 :type regular)
(efs :version 1.29 :type regular)
(edt :version 1.12 :type regular)
(edit-utils :version 2.07 :type single-file)
(ediff :version 1.47 :type regular)
(edebug :version 1.18 :type regular)
(ecrypto :version 0.13 :type regular)
(ecb :version 1.1 :type regular)
(docbookide :version 0.06 :type regular)
(dired :version 1.13 :type regular)
(dictionary :version 1.12 :type regular)
(debug :version 1.16 :type regular)
(crisp :version 1.12 :type regular)
(cookie :version 1.14 :type regular)
(clearcase :version 1.06 :type regular)
(cc-mode :version 1.39 :type regular)
(calendar :version 1.21 :type regular)
(calc :version 1.23 :type regular)
(c-support :version 1.16 :type single-file)
(build :version 1.1 :type regular)
(bbdb :version 1.23 :type regular)
(auctex :version 1.35 :type regular)
(ada :version 1.13 :type regular)
(skk :version 1.23 :type regular)
(mule-ucs :version 1.04 :type regular)
(mule-base :version 1.43 :type regular)
(lookup :version 1.13 :type regular)
(locale :version 1.2 :type regular)
(leim :version 1.21 :type regular)
(latin-unity :version 1.07 :type regular)
(egg-its :version 1.26 :type regular)
(edict :version 1.15 :type regular))
Installed Modules:
-----------------
Features:
--------
(xemacsbug shadow vm-digest atomic-extents cal-move cal-xemacs calendar tags
etags rect w3-style binhex executable gnus-fun ethio-util w3-hot url-file
url-cache w3-xemac w3-xemacs w3-toolbar xbm-button xpm-button w3-forms
images url-http url-cookie urlauth w3 w3-menu url-news url-gw w3-script
w3-jscript w3-elisp w3-java cus-edit cus-load w3-emulate w3-parse url mm
w3-display w3-mouse w3-imap w3-widget w3-vars w3-keyword w3-cus url-parse
url-vars css font mule-sysdp w3-cfg w3-sysdp iso-acc macros compile
gnus-topic gnus-draft cookie1 vm-reply ispell tex vm-delete view-less view
hyper-apropos vm-sort vm-virtual sha1-el hex-util flow-fill sort gnus-cite
smiley annotations gnus-async gnus-bcklg byte-optimize bytecomp byte-compile
gnus-ml passwd nndraft nnmh gnus-agent gnus-srvr gnus-score score-mode
nnvirtual gnus-msg gnus-art mm-uu mml2015 pgg pgg-parse pgg-def mm-view
gnus-sum gnus-group gnus-undo nntp nnoo nnmail mail-source format-spec
gnus-cache gnus-start gnus-spec gnus-int gnus-range gnus-win gnus gnus-ems
gnus-xmas wid-edit zenirc mspools vm-page vm-mime latin-unity-tables
latin-unity-utils latin-unity-latin10 latin-unity-vars latin-unity vm-save
vm-toolbar vm-summary tapestry vm-motion vm-message vm-menu vm-folder efs-cu
vm-undo vm-minibuf vm-macro vm-misc vm-mouse vm-window vm-autoload vm-vars
highlight-headers vm-version vm scroll-in-place redo desktop blink-paren
recent-files savehist alist after-save-commands env message messagexmas mml
mml-sec mml-smime smime dig mm-decode mm-bodies mm-encode mailcap lpr
mail-parse rfc2045 rfc2231 rfc2047 qp ietf-drums mail-abbrevs sendmail
mailheader canlock nnheader nnheaderxm gnus-util netrc time-date parse-time
mm-util mail-prsvr mail-utils mail-extr timezone pym static apel-ver product
mailcrypt rfc822 comint ring mmm advice advice-preload tex-site vm-startup
lazy-shot font-lock time cus-face disp-table w3-auto unidata unicode
mule-ucs-unicode un-data mucs mucs-ccl mucs-type mucs-error txt-tbl
trans-util un-define mule-uni latin-unity-latin9 latin-unity-latin8
latin-unity-latin7 gnuserv zenirc-autoloads xslt-process-autoloads
xslide-autoloads xemacs-devel-autoloads xemacs-base-autoloads w3-autoloads
vm-autoloads viper-autoloads view-process-autoloads vhdl-autoloads
vc-cc-autoloads vc-autoloads tramp-autoloads tpu-autoloads
tooltalk-autoloads tm-autoloads time-autoloads textools-autoloads
text-modes-autoloads texinfo-autoloads supercite-autoloads strokes-autoloads
speedbar-autoloads sounds-wav-autoloads sounds-au-autoloads
sml-mode-autoloads slider-autoloads sieve-autoloads sh-script-autoloads
sgml-autoloads semantic-autoloads scheme-autoloads sasl-autoloads
ruby-modes-autoloads rmail-autoloads reftex-autoloads python-modes-autoloads
psgml-dtds-autoloads psgml-autoloads ps-print-autoloads prog-modes-autoloads
pgg-autoloads perl-modes-autoloads pcomplete-autoloads pcl-cvs-autoloads
pc-autoloads os-utils-autoloads oo-browser-autoloads ocaml-autoloads
net-utils-autoloads mmm-mode-autoloads misc-games-autoloads mine-autoloads
mh-e-autoloads mew-autoloads mailcrypt-autoloads mail-lib-autoloads
liece-autoloads jde-autoloads ispell-autoloads ilisp-autoloads
igrep-autoloads idlwave-autoloads ibuffer-autoloads hyperbole-autoloads
hm--html-menus-autoloads haskell-mode-autoloads gnus-autoloads
gnats-autoloads games-autoloads fsf-compat-autoloads frame-icon-autoloads
fortran-modes-autoloads forms-autoloads footnote-autoloads eudc-autoloads
eterm-autoloads ess-autoloads eshell-autoloads emerge-autoloads
elib-autoloads eieio-autoloads efs-autoloads edt-autoloads
edit-utils-autoloads ediff-autoloads edebug-autoloads ecrypto-autoloads
ecb-autoloads docbookide-autoloads dired-autoloads dictionary-autoloads
debug-autoloads crisp-autoloads cookie-autoloads clearcase-autoloads
cc-mode-autoloads calendar-autoloads calc-autoloads c-support-autoloads
build-autoloads bbdb-autoloads auctex-autoloads apel-autoloads ada-autoloads
skk-autoloads mule-ucs-autoloads mule-base-autoloads lookup-autoloads
locale-autoloads leim-autoloads latin-unity-autoloads egg-its-autoloads
edict-autoloads lisp-autoloads loadhist auto-show fontl-hooks x-iso8859-1
canna-leim slovenian czech romanian ccl mule-help code-cmds gutter-items
menubar-items x-menubar mode-motion mouse itimer auto-save lisp-mode
easymenu iso8859-1 page buff-menu lib-complete cus-file derived frame
text-props obsolete cus-start custom widget cl-extra mini-cl cl cl-19
packages backquote very-early-lisp postgresqlv7 postgresql CANNA file-coding
wnn mule lucid-scrollbars cut-buffer lucid-menubars athena-dialogs x
c-balloon-help tty-frames tty toolbar native-sound scrollbar unix-processes
multicast network-streams subprocesses modules menu-accelerator-support
menubar berkeley-db md5 xemacs xim gutter tiff png gif jpeg xpm xbm
lisp-float-type linux dialog devices window-system base64)
Recent keystrokes:
-----------------
x h e l p RET l C-n C-n C-n C-v C-v C-v C-x o ESC >
C-p RET SPC S q C-x C-p C-n C-n C-n C-n C-n C-n C-n
C-n C-e BS ) LFD C-p ESC x a d SPC r e m o v e SPC
TAB RET RET RET RET C-z C-x C-r d e f a d v i c e C-a
C-n C-n C-n C-n C-z C-x m C-x k RET ESC x r e p o r
t SPC x e m a c s SPC b u g f RET BS RET
Recent messages (most recent first):
-----------------------------------
Loading xemacsbug...done
Loading xemacsbug...
12:50am Mail
12:49am Mail
12:49am Mail
12:49am Mail
Quit
12:48am Mail
12:48am Mail
12:48am Mail
12:47am Mail
12:47am Mail
12:47am Mail
12:46am Mail
12:46am 0.01 Mail
12:46am 0.01 Mail
12:45am 0.02 Mail
12:45am 0.02 Mail
12:45am 0.04 Mail
12:44am 0.05 Mail
--
“Ah come on now Ted, a Volkswagen with a mind of its own, driving all over
the place and going mad, if that’s not scary I don’t know what is.”