GNU bug report logs -
#20010
24.4; Issue with Unicode characters in package description
Previous Next
Reported by: João Guerra <joca.bt <at> gmail.com>
Date: Thu, 5 Mar 2015 20:46:02 UTC
Severity: normal
Merged with 20231
Found in versions 24.4, 25.0.50
Done: Artur Malabarba <bruce.connor.am <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 20010 <at> debbugs.gnu.org (full text, mbox):
> (package-refresh-contents)
> A popup buffer will always be shown, stating:
> These default coding systems were tried to encode text
> in the buffer ` *temp*':
Indeed, we have a problem in package.el because we use the same routine
in two cases: one where we just want to transfer bytes (typically, to
download an package or the `archive-contents' file), and the other
where we want to see actual characters (when we fetch the *-readme.txt).
I installed the following patch which should at lease fix the immediate
problem you're seeing, tho there may still be corner cases where the bug
will appear.
Stefan
diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el
index 23006e1..ff3eafd 100644
--- a/lisp/url/url-handlers.el
+++ b/lisp/url/url-handlers.el
@@ -334,8 +334,13 @@ They count bytes from the beginning of the body."
(unless (cadr size-and-charset)
;; If the headers don't specify any particular charset, use the
;; usual heuristic/rules that we apply to files.
- (decode-coding-inserted-region start (point) url visit beg end replace))
- (list url (car size-and-charset))))))
+ (decode-coding-inserted-region start (point) url
+ visit beg end replace))
+ (let ((inserted (car size-and-charset)))
+ (when (fboundp 'after-insert-file-set-coding)
+ (let ((insval (after-insert-file-set-coding inserted visit)))
+ (if insval (setq inserted insval))))
+ (list url inserted))))))
(put 'insert-file-contents 'url-file-handlers 'url-insert-file-contents)
This bug report was last modified 10 years and 86 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.