From c25024a3a63e4e6bf71f882d2e8697c831dd3a91 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Thu, 16 Oct 2014 14:33:19 +0100 Subject: [PATCH] a couple of robustification fixes - let squeeze-string-plistify handle a nil `end' parameter - decode the url-unhexified string as utf-8 --- squeeze.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/squeeze.el b/squeeze.el index cdfb86d..1e34449 100644 --- a/squeeze.el +++ b/squeeze.el @@ -329,6 +329,8 @@ playerindex playerid uuid ip name model isplayer displaytype canpoweroff connected power volume) (defun squeeze-string-plistify (string start end) + (unless end + (setq end (length string))) (save-match-data (let (result) (loop @@ -337,7 +339,10 @@ (when (> mend end) (return)) (push (intern (format ":%s" (substring string (match-beginning 1) (match-end 1)))) result) - (push (url-unhex-string (substring string (match-beginning 2) (match-end 2))) result) + (push (decode-coding-string + (url-unhex-string (substring string (match-beginning 2) (match-end 2))) + 'utf-8) + result) (setq start mend)) (return))) (nreverse result)))) -- 2.39.5