From 3fe437985f679c8c5bc5cb72836d1e3c014b6162 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Tue, 25 Feb 2020 23:57:50 +0200 Subject: [PATCH] utils: explicitly decode contacts string Seems emacs doesn't know yet they're utf-8. Fixes #1589. --- mu4e/mu4e-utils.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mu4e/mu4e-utils.el b/mu4e/mu4e-utils.el index 1dd38c43..4c6ab70e 100644 --- a/mu4e/mu4e-utils.el +++ b/mu4e/mu4e-utils.el @@ -684,8 +684,9 @@ This is used by the completion function in mu4e-compose." (if (functionp mu4e-contact-process-function) (funcall mu4e-contact-process-function (car contact)) (car contact)))) - (when address - (puthash address (cdr contact) mu4e~contacts)))) + (when address ;; note the explicit deccode; the strings we get are utf-8, + ;; but emacs doesn't know yet. + (puthash (decode-coding-string address 'utf-8) (cdr contact) mu4e~contacts)))) (setq mu4e~contacts-tstamp (or tstamp "0"))