From ca9c4ee537a82d72fefd6694f037b82b6f094e6b Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Mon, 21 Apr 2014 21:56:55 +0100 Subject: [PATCH] decode utf-8 as well as unhex in comint network stream output --- squeeze.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/squeeze.el b/squeeze.el index 406ffac..86fd2e9 100644 --- a/squeeze.el +++ b/squeeze.el @@ -15,10 +15,13 @@ (define-key map (kbd "TAB") 'completion-at-point) map)) +(defun squeeze-unhex-and-decode-utf8-string (string) + (decode-coding-string (url-unhex-string string) 'utf-8)) + (define-derived-mode squeeze-mode comint-mode "Squeeze" "Major mode for interacting with the Squeezebox Server CLI.\\" (add-to-list 'completion-at-point-functions 'squeeze-complete-command-at-point) - (add-hook 'comint-preoutput-filter-functions 'url-unhex-string nil t) + (add-hook 'comint-preoutput-filter-functions 'squeeze-unhex-and-decode-utf8-string nil t) (add-hook 'comint-preoutput-filter-functions 'squeeze-update-state nil t)) (defvar squeeze-control-mode-map -- 2.30.2