[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ncr (numeric character reference) to unicode
From: |
Miles Bader |
Subject: |
Re: ncr (numeric character reference) to unicode |
Date: |
Tue, 14 Apr 2009 12:07:13 +0900 |
"B. T. Raven" <nihil@nihilo.net> writes:
> Does any of you know whether nxhtml has the capability to convert
> sequences like this:
>
> שַׁלוֹם.
> (shalom in Hebrew)
The following should work:
(defun expand-html-encoded-chars (start end)
(interactive "r")
(save-excursion
(goto-char start)
(while (re-search-forward "&#\\([0-9]+\\);" end t)
(replace-match
(char-to-string
(decode-char 'ucs (string-to-number (match-string 1))) )
t t))))
-Miles
--
Guilt, n. The condition of one who is known to have committed an indiscretion,
as distinguished from the state of him who has covered his tracks.
- ncr (numeric character reference) to unicode, B. T. Raven, 2009/04/13
- Re: ncr (numeric character reference) to unicode, Eli Zaretskii, 2009/04/13
- Re: ncr (numeric character reference) to unicode,
Miles Bader <=
- Re: ncr (numeric character reference) to unicode, Kevin Rodgers, 2009/04/16
- Message not available
- Re: ncr (numeric character reference) to unicode, B. T. Raven, 2009/04/16
- Re: ncr (numeric character reference) to unicode, Stephen Berman, 2009/04/17
- Message not available
- Re: ncr (numeric character reference) to unicode, B. T. Raven, 2009/04/17