Article View: gnu.emacs.vm.bug
Article #604Re: non-ascii characters problems
From: newsspam5REMOVETHIS
Date: Thu, 04 May 2006 21:26
Date: Thu, 04 May 2006 21:26
73 lines
3609 bytes
3609 bytes
""=?iso-8859-1?q?Jos=E9_Miguel_Figueroa?="" <j.m.figueroa@gmail.com> writes:
> I'm using VM hack@robf.de--2005/vm--robf--7.19--patch-33 under GNU
> Emacs 22.0.50.1 (powerpc-apple-darwin7.9.0) of 2006-05-04 on
> rodrigues.inf.ed.ac.uk - Aquamacs Distribution 0.9.9CVS.
>
> I am encountering two problems:
>
> 1) replying to a message whose author has non-ascii characters in the
> name gives an error, for example:
>
> byte-code: Cannot create temporary name for prefix: invalid argument,
> /Users/jmf/Mail/#reply to Morten H�gholm<2>#
Is it possible to create this file by hand, i.e.
touch '/Users/jmf/Mail/#reply to Morten H�gholm<2>#'
which works fine on Linux?
If it does not work tryt the patch below which replaces 8 bit
chars by a "_".
> 2) some mails I receive containing non-ascii characters in the
> iso-8859-1 character set are not displayed properly in VM; although
> when I edit the message, they are there in their full 8-bit glory.
> Also if I Reply to the message, they are included correctly in the
> reply. I have noticed that the errors are the following:
> a character with unicode U+00XX will be displayed as a character with
> ASCII code XX (in Hex). For example, � (which has unicode U+00E9)
> will be displayed as � (which has ascii 233 whose hex value is E9).
You should google for UTF-8 support in Emacs ...
> Any ideas???
None.
Robert.
--- orig/vm-reply.el
+++ mod/vm-reply.el
@@ -1235,11 +1235,22 @@
(defvar mail-signature-file)
(defvar mail-personal-alias-file)
+(defun vm-drop-8bit-chars (buffer-name)
+ (if (not buffer-name)
+ nil
+ (let ((i 0) (l (length buffer-name)))
+ (while (< i l)
+ (if (> (aref buffer-name i) 127)
+ (aset buffer-name i ?_))
+ (setq i (1+ i))))
+ buffer-name))
+
(defun vm-mail-internal
(&optional buffer-name to subject in-reply-to cc references newsgroups)
(let ((folder-buffer nil))
(if (memq major-mode '(vm-mode vm-virtual-mode))
(setq folder-buffer (current-buffer)))
+ (setq buffer-name (vm-drop-8bit-chars buffer-name))
(set-buffer
(generate-new-buffer
(or (if buffer-name
@@ -1608,6 +1619,7 @@
newbufname (format fmt newbufname ellipsis))
(if (equal newbufname curbufname)
nil
+ (setq newbufname (vm-drop-8bit-chars newbufname))
(rename-buffer newbufname t)))))
(defun vm-mail-mode-remove-tm-hooks ()
Technical Details
Message-ID:
<857j51lbvw.fsf@robf.de>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.cw.net!cw.net!news-FFM2.ecrc.de!news.m-online.net!not-for-mailReferences:
<1146758854.834416.98730@j33g2000cwa.googlegroups.com>Show Full Headers
Complete Article Headers
X-Google-Thread: f6829,ba5f9e2715277f24 X-Google-Attributes: gidf6829,public X-Google-Language: ENGLISH,ASCII Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.cw.net!cw.net!news-FFM2.ecrc.de!news.m-online.net!not-for-mail From: newsspam5REMOVETHIS@robf.de Newsgroups: gnu.emacs.vm.bug Subject: Re: non-ascii characters problems Date: Thu, 04 May 2006 23:26:43 +0200 Organization: (posted via) Mnet Telekommunikations GmbH Lines: 77 Message-ID: <857j51lbvw.fsf@robf.de> References: <1146758854.834416.98730@j33g2000cwa.googlegroups.com> NNTP-Posting-Host: ppp-82-135-73-25.mnet-online.de Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: svr7.m-online.net 1146778003 16342 82.135.73.25 (4 May 2006 21:26:43 GMT) X-Complaints-To: abuse@m-online.net NNTP-Posting-Date: Thu, 4 May 2006 21:26:43 +0000 (UTC) User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.17 (linux) Cancel-Lock: sha1:r28fZArSD0UK/UTXW2HqPcDyKFw=