diff options
author | Steve Purcell <steve@sanityinc.com> | 2015-04-19 17:47:02 +0100 |
---|---|---|
committer | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-04-19 17:56:46 +0100 |
commit | 4155619aacae2a225cec7ba9008f15258d30a7e0 (patch) | |
tree | a30be7e4b8921b6c15891fab900af61ddc406066 /lisp/emacs-lisp | |
parent | d35f2f482273a822df695202f4a3bf1a5e473e63 (diff) | |
download | emacs-4155619aacae2a225cec7ba9008f15258d30a7e0.tar.gz emacs-4155619aacae2a225cec7ba9008f15258d30a7e0.tar.bz2 emacs-4155619aacae2a225cec7ba9008f15258d30a7e0.zip |
Assume package archive-contents are UTF8-encoded
* lisp/emacs-lisp/package.el (package--read-archive-file):
Set `coding-system-for-read' explicitly to 'utf-8 when reading the
downloaded and cached archive-contents files, so that non-ASCII
characters in package descriptions are displayed correctly in the
`list-packages' menu. (Bug#20231)
Co-authored-by: Steve Purcell <steve@sanityinc.com>
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/package.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 2fb54f0d944..9cd6b3b9a66 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1283,7 +1283,8 @@ Will throw an error if the archive version is too new." (let ((filename (expand-file-name file package-user-dir))) (when (file-exists-p filename) (with-temp-buffer - (insert-file-contents-literally filename) + (let ((coding-system-for-read 'utf-8)) + (insert-file-contents filename)) (let ((contents (read (current-buffer)))) (if (> (car contents) package-archive-version) (error "Package archive version %d is higher than %d" |