summaryrefslogtreecommitdiff
path: root/lisp/arc-mode.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2019-05-18 10:02:25 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2019-05-18 10:12:57 +0200
commit45ffe7329e88226809b860a9e8d57f09815820fc (patch)
tree8168b4067494f577ecbdcc42814371dc9aadbe6b /lisp/arc-mode.el
parent6c9a1deb41f0a9d3dd7e8615a0015a74a851b426 (diff)
downloademacs-45ffe7329e88226809b860a9e8d57f09815820fc.tar.gz
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.
Diffstat (limited to 'lisp/arc-mode.el')
-rw-r--r--lisp/arc-mode.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index 871395ebb48..9eec7ea0868 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)