bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#16733: messed up unicode chars in package description


From: Juanma Barranquero
Subject: bug#16733: messed up unicode chars in package description
Date: Wed, 19 Mar 2014 11:19:19 +0100

On Wed, Mar 19, 2014 at 7:26 AM, Glenn Morris <rgm@gnu.org> wrote:

> (Presumably it could still go wrong if it ever finds a non-ascii,
> non-utf-8 package

True. What about this one?

=== modified file 'lisp/emacs-lisp/package.el'
--- lisp/emacs-lisp/package.el  2014-03-14 20:55:40 +0000
+++ lisp/emacs-lisp/package.el  2014-03-19 10:17:45 +0000
@@ -1528,7 +1528,9 @@
                        (let ((version-control 'never)
                              (require-final-newline t))
                          (save-buffer))
-                       (setq readme-string (buffer-string))
+                       (let* ((text (buffer-string))
+                              (coding (detect-coding-string text t)))
+                         (setq readme-string (decode-coding-string
text coding t)))
                        t))
                 (error nil))
               (insert readme-string))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]