emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/international/mule.el


From: Colin Walters
Subject: [Emacs-diffs] Changes to emacs/lisp/international/mule.el
Date: Tue, 21 May 2002 17:50:28 -0400

Index: emacs/lisp/international/mule.el
diff -c emacs/lisp/international/mule.el:1.144 
emacs/lisp/international/mule.el:1.145
*** emacs/lisp/international/mule.el:1.144      Tue May 21 17:14:03 2002
--- emacs/lisp/international/mule.el    Tue May 21 17:50:28 2002
***************
*** 1928,1944 ****
    (when (re-search-forward "\\`[[:space:]\n]*<\\?xml")
      (let ((end (save-excursion
                 ;; This is a hack.
!                (search-forward "\"\\s-*?>" size t))))
        (when end
        (if (re-search-forward "encoding=\"\\(.+?\\)\"" end t)
            (let ((match (downcase (match-string 1))))
!             ;; FIXME: what other encodings are valid, and how can we
!             ;; translate them to the names of coding systems?
!             (cond ((string= match "utf-8")
!                    'utf-8)
                    ((string-match "iso-8859-[[:digit:]]+" match)
                     (intern match))
!                   (t nil)))
          'utf-8)))))
  
  ;;;
--- 1928,1944 ----
    (when (re-search-forward "\\`[[:space:]\n]*<\\?xml")
      (let ((end (save-excursion
                 ;; This is a hack.
!                (re-search-forward "\"\\s-*\\?>" size t))))
        (when end
        (if (re-search-forward "encoding=\"\\(.+?\\)\"" end t)
            (let ((match (downcase (match-string 1))))
!             (cond ((member match '("utf-8" "iso-2022-jp"
!                                    "euc-jp" "shift_jis"))
!                    (intern match))
                    ((string-match "iso-8859-[[:digit:]]+" match)
                     (intern match))
!                   (t (message "Warning: unknown XML encoding %s" match)
!                      nil)))
          'utf-8)))))
  
  ;;;



reply via email to

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