unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#5553: 23.1.92; Archives with wrong coding system
@ 2010-02-09 21:19 Juri Linkov
  2010-02-09 22:19 ` Juri Linkov
  2010-02-09 22:34 ` Eli Zaretskii
  0 siblings, 2 replies; 7+ messages in thread
From: Juri Linkov @ 2010-02-09 21:19 UTC (permalink / raw)
  To: 5553

When `archive-mode' is enabled for an archive file with an unknown file
extension, using the rule ("\\(PK00\\)?[P]K\003\004" . archive-mode)
from `magic-fallback-mode-alist', visiting such a file fails with the
args-out-of-range error.

The following patch should fix this bug using the same regexp as in
`magic-fallback-mode-alist' and the same coding system as for archive
file extensions in `auto-coding-alist':

=== modified file 'lisp/international/mule.el'
--- lisp/international/mule.el	2010-02-01 22:57:45 +0000
+++ lisp/international/mule.el	2010-02-09 21:18:51 +0000
@@ -1653,7 +1653,9 @@ (defcustom auto-coding-regexp-alist
     ("\\`\xFE\xFF" . utf-16be-with-signature)
     ("\\`\xFF\xFE" . utf-16le-with-signature)
     ("\\`\xEF\xBB\xBF" . utf-8-with-signature)
-    ("\\`;ELC\024\0\0\0" . emacs-mule)))	; Emacs 20-compiled
+    ("\\`;ELC\024\0\0\0" . emacs-mule)	; Emacs 20-compiled
+    ;; For `archive-mode' in `magic-fallback-mode-alist':
+    ("\\(PK00\\)?[P]K\003\004" . no-conversion-multibyte)))
   "Alist of patterns vs corresponding coding systems.
 Each element looks like (REGEXP . CODING-SYSTEM).
 A file whose first bytes match REGEXP is decoded by CODING-SYSTEM on reading.

-- 
Juri Linkov
http://www.jurta.org/emacs/







^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-02-11  2:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-09 21:19 bug#5553: 23.1.92; Archives with wrong coding system Juri Linkov
2010-02-09 22:19 ` Juri Linkov
2010-02-09 22:34 ` Eli Zaretskii
2010-02-10  0:09   ` Juri Linkov
2010-02-10 20:14     ` Stefan Monnier
2010-02-10 22:33       ` Juri Linkov
2010-02-11  2:12         ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).