From: Miles Bader <miles@gnu.org>
Subject: Re: displaying escaped unicode files
Date: Thu, 14 Sep 2006 07:29:18 +0900 [thread overview]
Message-ID: <87venrh03l.fsf@catnip.gol.com> (raw)
In-Reply-To: <mailman.6847.1158116285.9609.help-gnu-emacs@gnu.org> (Gulliver7's message of "Tue, 12 Sep 2006 19:58:00 -0700 (PDT)")
Gulliver7 <rpontisso@yahoo.co.uk> writes:
> http://www.nabble.com/user-files/235986/escapedunicode.properties
> escapedunicode.properties
If you have the previously mentioned `ucs-insert' function (either by
running Emacs 22, or from Dave Love's code for earlier emacs), you can
use a simple function like the following to do the whole buffer:
(defun expand-ucs-escapes ()
(interactive)
(save-excursion
(goto-char (point-min))
(while (re-search-forward "[\\]u\\([0-9a-f][0-9a-f][0-9a-f][0-9a-f]\\)"
nil t)
(let ((code (match-string 1)))
(delete-region (match-beginning 0) (match-end 0))
(ucs-insert code)))))
[Invoke it as "M-x expand-ucs-escapes" or bind it to a key or something.]
-Miles
--
"1971 pickup truck; will trade for guns"
next prev parent reply other threads:[~2006-09-13 22:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-12 16:17 displaying escaped unicode files Gulliver7
2006-09-12 18:12 ` Kevin Rodgers
2006-09-13 2:58 ` Gulliver7
[not found] ` <mailman.6847.1158116285.9609.help-gnu-emacs@gnu.org>
2006-09-13 4:15 ` B. T. Raven
2006-09-13 22:29 ` Miles Bader [this message]
[not found] <mailman.6822.1158077825.9609.help-gnu-emacs@gnu.org>
2006-09-13 0:19 ` B. T. Raven
2006-09-13 3:15 ` Gulliver7
2006-09-13 8:33 ` Peter Dyballa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87venrh03l.fsf@catnip.gol.com \
--to=miles@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).