[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [VM] displaying text/html with utf-8 via w3m
From: |
Ralf Fassel |
Subject: |
Re: [VM] displaying text/html with utf-8 via w3m |
Date: |
Fri, 30 Jan 2015 13:14:18 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
* Ralf Fassel <address@hidden>
| In my setting process-coding-system-alist is nil, but
| 'default-process-coding-system' is (iso-latin-9-unix . iso-latin-9-unix).
| So what is really sent to w3m is latin-9, but w3m is told to process the
| input as UTF-8. This replaces the latin-9 non-ASCII chars by " ".
>
| If I temporarily set
| (default-process-coding-system '(utf-8 . utf-8))
| then the Presentation buffer contains the correct decoded mail message.
>
| IMHO 'vm-mime-display-internal-w3m-text/html' should temporarily adjust
| the default-process-coding-system to match what w3m is told to expect.
In GNU Emacs, this works for me (don't know for Xemacs):
--- vm-8.2.0b/lisp/vm-mime.el~ 2011-12-27 23:19:28.000000000 +0100
+++ vm-8.2.0b/lisp/vm-mime.el 2015-01-30 13:12:45.488159066 +0100
@@ -2719,7 +2719,9 @@
part))
(defun vm-mime-display-internal-w3m-text/html (start end layout)
- (let ((charset (or (vm-mime-get-parameter layout "charset") "us-ascii")))
+ (let* ((charset (or (vm-mime-get-parameter layout "charset") "us-ascii"))
+ (cds (coding-system-from-name charset))
+ (default-process-coding-system (if cds (cons cds cds)
default-process-coding-system)))
(shell-command-on-region
start (1- end)
(format "w3m -dump -T text/html -I %s -O %s" charset charset)
Diff finished. Fri Jan 30 13:12:51 2015
HTH
R'