emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 45ffe73: Remove usage of string-as-unibyte in arc-m


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 45ffe73: Remove usage of string-as-unibyte in arc-mode
Date: Sat, 18 May 2019 04:13:01 -0400 (EDT)

branch: master
commit 45ffe7329e88226809b860a9e8d57f09815820fc
Author: Eli Zaretskii <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Remove usage of string-as-unibyte in arc-mode
    
    * lisp/arc-mode.el (archive-l-e): Encode with utf-8-emacs-unix
    instead of using string-as-unibyte.
---
 lisp/arc-mode.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index 871395e..9eec7ea 100644
--- a/lisp/arc-mode.el
+++ b/lisp/arc-mode.el
@@ -535,7 +535,8 @@ in which case a second argument, length LEN, should be 
supplied."
   (if (stringp str)
       (setq len (length str))
     (setq str (buffer-substring str (+ str len))))
-  (setq str (string-as-unibyte str))
+  (if (multibyte-string-p str)
+      (setq str (encode-coding-string str 'utf-8-emacs-unix)))
   (let ((result 0)
         (i 0))
     (while (< i len)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]