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>
This commit is contained in:
parent
d35f2f4822
commit
4155619aac
1 changed files with 2 additions and 1 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue