mu4e: explicitly specify utf8 for html-view actions
Explicitly add the (html 5) <meta charset ...> for UTF-8; not all browsers default to UTF-8 and could show the class "Â" characters when interpreting UTF-8 as ISO-8859-1.
This commit is contained in:
@ -84,6 +84,7 @@ You can influence the browser to use with the variable
|
|||||||
(mu4e-error "No body part for this message"))
|
(mu4e-error "No body part for this message"))
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
;; simplistic -- but note that it's only an example...
|
;; simplistic -- but note that it's only an example...
|
||||||
|
(insert "<head><meta charset=\"UTF-8\"></head>\n")
|
||||||
(insert (or html (concat "<pre>" txt "</pre>")))
|
(insert (or html (concat "<pre>" txt "</pre>")))
|
||||||
(write-file tmpfile)
|
(write-file tmpfile)
|
||||||
(browse-url (concat "file://" tmpfile)))))
|
(browse-url (concat "file://" tmpfile)))))
|
||||||
@ -104,6 +105,7 @@ You can influence the browser to use with the variable
|
|||||||
(mu4e-error "No body part for this message"))
|
(mu4e-error "No body part for this message"))
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
;; simplistic -- but note that it's only an example...
|
;; simplistic -- but note that it's only an example...
|
||||||
|
(insert "<head><meta charset=\"UTF-8\"></head>\n")
|
||||||
(insert (or html (concat "<pre>" txt "</pre>")))
|
(insert (or html (concat "<pre>" txt "</pre>")))
|
||||||
(write-file tmpfile)
|
(write-file tmpfile)
|
||||||
(xwidget-webkit-browse-url (concat "file://" tmpfile) t))))
|
(xwidget-webkit-browse-url (concat "file://" tmpfile) t))))
|
||||||
|
|||||||
Reference in New Issue
Block a user