From: Eli Zaretskii <eliz@gnu.org>
To: Ivan Shmakov <ivan@siamics.net>
Cc: steve@sanityinc.com, 20231@debbugs.gnu.org
Subject: bug#20231: 25.0.50; package.el mangles non-ascii content in downloaded archive-contents data
Date: Sat, 11 Apr 2015 21:35:33 +0300 [thread overview]
Message-ID: <83mw2eecne.fsf@gnu.org> (raw)
In-Reply-To: <878udysfn2.fsf@violet.siamics.net>
> From: Ivan Shmakov <ivan@siamics.net>
> Date: Sat, 11 Apr 2015 18:07:13 +0000
>
> >>>>> Steve Purcell <steve@sanityinc.com> writes:
>
> > --- a/lisp/emacs-lisp/package.el
> > +++ b/lisp/emacs-lisp/package.el
> > @@ -1279,12 +1279,13 @@ defun package--read-archive-file (file)
> > (let ((filename (expand-file-name file package-user-dir)))
> > (when (file-exists-p filename)
> > (with-temp-buffer
> > - (insert-file-contents-literally filename)
> > - (let ((contents (read (current-buffer))))
> > - (if (> (car contents) package-archive-version)
> > - (error "Package archive version %d is higher than %d"
> > - (car contents) package-archive-version))
> > - (cdr contents))))))
> > + (let ((coding-system-for-read 'utf-8))
> > + (insert-file-contents filename)
>
> As insert-file-contents may imply a whole lot of additional
> processing beyond decoding UTF-8, I’d rather use an explicit
> decode-coding-region here
Can you explain why? What additional processing can get in the way?
next prev parent reply other threads:[~2015-04-11 18:35 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-30 16:21 bug#20231: 25.0.50; package.el mangles non-ascii content in downloaded archive-contents data Steve Purcell
2015-03-30 20:58 ` Stefan Monnier
[not found] ` <CD30FDF5-7F20-47B7-9DE8-7DDC1C6BC1B1@sanityinc.com>
[not found] ` <jwv619iauly.fsf-monnier+emacsbugs@gnu.org>
[not found] ` <6343E9EC-9E23-4D44-9CD1-82C26DB7CDA3@sanityinc.com>
[not found] ` <jwv619h8ffv.fsf-monnier+emacsbugs@gnu.org>
2015-04-11 17:08 ` Steve Purcell
2015-04-11 17:41 ` Eli Zaretskii
2015-04-11 18:48 ` Steve Purcell
2015-04-11 18:56 ` Eli Zaretskii
2015-04-11 18:07 ` Ivan Shmakov
2015-04-11 18:35 ` Eli Zaretskii [this message]
2015-04-11 19:30 ` Ivan Shmakov
2015-04-11 19:48 ` Eli Zaretskii
2015-04-13 12:31 ` Artur Malabarba
2015-04-13 14:02 ` Stefan Monnier
2015-04-13 20:45 ` Steve Purcell
2015-04-19 15:21 ` Artur Malabarba
2015-04-19 15:23 ` Steve Purcell
2015-04-19 16:40 ` Eli Zaretskii
2015-04-19 17:01 ` Artur Malabarba
[not found] ` <handler.20231.D20231.14294629225589.notifdone@debbugs.gnu.org>
2015-04-19 17:06 ` bug#20231: closed (Re: bug#20231: 25.0.50; package.el mangles non-ascii content in downloaded archive-contents data) Steve Purcell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83mw2eecne.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=20231@debbugs.gnu.org \
--cc=ivan@siamics.net \
--cc=steve@sanityinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.