diff options
| -rw-r--r-- | lisp/international/mule.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/international/mule.el b/lisp/international/mule.el index b2ec27dc3b0..c01ff2e4eb6 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el | |||
| @@ -1928,17 +1928,17 @@ This function is intended to be added to `auto-coding-functions'." | |||
| 1928 | (when (re-search-forward "\\`[[:space:]\n]*<\\?xml") | 1928 | (when (re-search-forward "\\`[[:space:]\n]*<\\?xml") |
| 1929 | (let ((end (save-excursion | 1929 | (let ((end (save-excursion |
| 1930 | ;; This is a hack. | 1930 | ;; This is a hack. |
| 1931 | (search-forward "\"\\s-*?>" size t)))) | 1931 | (re-search-forward "\"\\s-*\\?>" size t)))) |
| 1932 | (when end | 1932 | (when end |
| 1933 | (if (re-search-forward "encoding=\"\\(.+?\\)\"" end t) | 1933 | (if (re-search-forward "encoding=\"\\(.+?\\)\"" end t) |
| 1934 | (let ((match (downcase (match-string 1)))) | 1934 | (let ((match (downcase (match-string 1)))) |
| 1935 | ;; FIXME: what other encodings are valid, and how can we | 1935 | (cond ((member match '("utf-8" "iso-2022-jp" |
| 1936 | ;; translate them to the names of coding systems? | 1936 | "euc-jp" "shift_jis")) |
| 1937 | (cond ((string= match "utf-8") | 1937 | (intern match)) |
| 1938 | 'utf-8) | ||
| 1939 | ((string-match "iso-8859-[[:digit:]]+" match) | 1938 | ((string-match "iso-8859-[[:digit:]]+" match) |
| 1940 | (intern match)) | 1939 | (intern match)) |
| 1941 | (t nil))) | 1940 | (t (message "Warning: unknown XML encoding %s" match) |
| 1941 | nil))) | ||
| 1942 | 'utf-8))))) | 1942 | 'utf-8))))) |
| 1943 | 1943 | ||
| 1944 | ;;; | 1944 | ;;; |