aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Griffith <griffitaj@gmail.com>2017-04-22 15:34:39 -0400
committerJohnson Denen <johnson.denen@gmail.com>2017-04-22 16:27:46 -0400
commita2ac4793be944dd3037d563f5d7c452b3773af88 (patch)
tree0d6c245311ea35b4d9fdd150e9ae86645150aa31
parente26e85c6c3190d7166ba39cfad3ce9f84eb8d6a0 (diff)
Fix 32 decode utf-8 for content, name and handle
-rw-r--r--lisp/mastodon-tl.el9
1 files changed, 6 insertions, 3 deletions
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)))