diff options
| author | Colin Walters | 2002-05-21 21:50:28 +0000 |
|---|---|---|
| committer | Colin Walters | 2002-05-21 21:50:28 +0000 |
| commit | 2f4e9c4745f53dc9faf1f3dc5fbb750ab9cdc3ff (patch) | |
| tree | 79981bf68fb23781a79c666a337c6ba5358bb324 | |
| parent | 1b65564c097462fba57cbc34c2f64e23c46693d0 (diff) | |
| download | emacs-2f4e9c4745f53dc9faf1f3dc5fbb750ab9cdc3ff.tar.gz emacs-2f4e9c4745f53dc9faf1f3dc5fbb750ab9cdc3ff.zip | |
(sgml-xml-auto-coding-function): Update with more known XML encodings.
| -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 | ;;; |