From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.help Subject: Re: displaying escaped unicode files Date: Thu, 14 Sep 2006 07:29:18 +0900 Message-ID: <87venrh03l.fsf@catnip.gol.com> References: <6269354.post@talk.nabble.com> Reply-To: Miles Bader NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1158186596 31299 80.91.229.2 (13 Sep 2006 22:29:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 13 Sep 2006 22:29:56 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 14 00:29:53 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GNdEj-0007sF-GJ for geh-help-gnu-emacs@m.gmane.org; Thu, 14 Sep 2006 00:29:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GNdEi-000693-Vx for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Sep 2006 18:29:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GNdEX-00068u-34 for help-gnu-emacs@gnu.org; Wed, 13 Sep 2006 18:29:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GNdEV-00068i-VO for help-gnu-emacs@gnu.org; Wed, 13 Sep 2006 18:29:28 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GNdEV-00068f-86 for help-gnu-emacs@gnu.org; Wed, 13 Sep 2006 18:29:27 -0400 Original-Received: from [203.216.5.72] (helo=smtp02.dentaku.gol.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GNdGG-0007W6-Gj; Wed, 13 Sep 2006 18:31:17 -0400 Original-Received: from 203-216-98-149.dsl.gol.ne.jp ([203.216.98.149] helo=catnip.gol.com) by smtp02.dentaku.gol.com with esmtpa (Dentaku) id 1GNdEO-00060m-FG; Thu, 14 Sep 2006 07:29:20 +0900 Original-Received: by catnip.gol.com (Postfix, from userid 1000) id 203E42F4D; Thu, 14 Sep 2006 07:29:18 +0900 (JST) Original-To: help-gnu-emacs@gnu.org System-Type: i686-pc-linux-gnu In-Reply-To: (Gulliver7's message of "Tue, 12 Sep 2006 19:58:00 -0700 (PDT)") Original-Lines: 23 X-Abuse-Complaints: abuse@gol.com X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:37352 Archived-At: Gulliver7 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"