← Back to team overview

vm team mailing list archive

[Bug 412670] Re: chinese email display problem

 

** Also affects: vm
   Importance: Undecided
       Status: New

-- 
chinese email display problem
https://bugs.launchpad.net/bugs/412670
You received this bug notification because you are a member of VM
development team, which is the registrant for vm.

Status in View Mail (aka VM) for Emacs: New
Status in VM (View Mail) for Emacs: New

Bug description:
VM 7.19, but the code is the same in 8.0.X.
Received MIME email with part encoded text/plain, charset GB2312.
Running Emacs 23.0.92.4 in a plain text terminal window that understands utf-8.
Variable vm-mime-charset-converter-alist is set so that gb2312 is converted to utf-8.

When I display the email message, VM converts it to utf-8, which my terminal
program is set up to display.  I see the correct Chinese characters when I place a
(sit-for 5) at the beginning of vm-mime-charset-decode-region, but the buffer is later
messed up by this function.  I think the order of the COND tests is wrong.  The function
should do nothing if display of multiple fonts is impossible or the charset (utf-8) is
my VM MIME default face.  The following patch fixes the problem for me.


*** vm-mime.el.~1~      Fri Jun 11 21:59:27 2004
--- vm-mime.el  Wed Aug 12 14:22:05 2009
***************
*** 233,239 ****

  (defun vm-mime-charset-decode-region (charset start end)
    (or (markerp end) (setq end (vm-marker end)))
!   (cond ((or vm-xemacs-mule-p vm-fsfemacs-mule-p)
         (if (or (and vm-xemacs-p (memq (device-type) '(x gtk mswindows)))
                 vm-fsfemacs-p
                 nil)
--- 233,241 ----

  (defun vm-mime-charset-decode-region (charset start end)
    (or (markerp end) (setq end (vm-marker end)))
!   (cond ((not (vm-multiple-fonts-possible-p)) nil)
!         ((vm-mime-default-face-charset-p charset) nil)
!         ((or vm-xemacs-mule-p vm-fsfemacs-mule-p)
         (if (or (and vm-xemacs-p (memq (device-type) '(x gtk mswindows)))
                 vm-fsfemacs-p
                 nil)
***************
*** 252,259 ****
                     (put-text-property start end 'vm-coding (car cell))))
               ;; In XEmacs 20.0 beta93 decode-coding-region moves point.
               (goto-char opoint))))
-       ((not (vm-multiple-fonts-possible-p)) nil)
-       ((vm-mime-default-face-charset-p charset) nil)
        (t
         (let ((font (cdr (vm-string-assoc
                           charset
--- 254,259 ----