[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: auto-detecting encoding for XML
From: |
Eli Zaretskii |
Subject: |
Re: auto-detecting encoding for XML |
Date: |
Mon, 20 May 2002 07:48:27 +0300 (IDT) |
On 18 May 2002, Colin Walters wrote:
> + (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)))
Why didn't you use `intern' in all cases? If you are bothered by the
possibility that the resulting symbol is not a valid coding system, you
can check that with coding-system-p.
Btw, does this change honor "C-x RET c"?
- Re: auto-detecting encoding for XML, (continued)
- Re: auto-detecting encoding for XML, Stefan Monnier, 2002/05/20
- Re: auto-detecting encoding for XML, Kai Großjohann, 2002/05/20
- Re: auto-detecting encoding for XML, Stefan Monnier, 2002/05/20
- Re: auto-detecting encoding for XML, Kai Großjohann, 2002/05/20
- Re: auto-detecting encoding for XML, Colin Walters, 2002/05/20
- Re: auto-detecting encoding for XML, Colin Walters, 2002/05/20
Re: auto-detecting encoding for XML,
Eli Zaretskii <=
Re: auto-detecting encoding for XML, Richard Stallman, 2002/05/20