From a2ac4793be944dd3037d563f5d7c452b3773af88 Mon Sep 17 00:00:00 2001 From: Alexander Griffith Date: Sat, 22 Apr 2017 15:34:39 -0400 Subject: Fix 32 decode utf-8 for content, name and handle --- lisp/mastodon-tl.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lisp') diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 6c9b4e5..3944084 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -89,8 +89,11 @@ (defun mastodon-tl--byline-author (toot) "Propertize author of TOOT." (let* ((account (cdr (assoc 'account toot))) - (handle (cdr (assoc 'acct account))) - (name (cdr (assoc 'display_name account)))) + ;; It may not be necissary to decode the handle + (handle (decode-coding-string + (cdr (assoc 'acct account))'utf-8)) + (name (decode-coding-string + (cdr (assoc 'display_name account)) 'utf-8))) (concat (propertize name 'face 'warning) " (@" @@ -134,7 +137,7 @@ Return value from boosted content if available." "Retrieve text content from TOOT." (let ((content (mastodon-tl--field 'content toot))) (propertize (with-temp-buffer - (insert content) + (insert (decode-coding-string content 'utf-8)) (shr-render-region (point-min) (point-max)) (buffer-string)) 'face 'default))) -- cgit v1.2.3