From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joe Corneli Newsgroups: gmane.emacs.help Subject: Re: making "玄奘" say "Xuanzang" in chinese Date: Wed, 23 Mar 2005 10:29:38 -0600 Message-ID: References: NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1111596064 3036 80.91.229.2 (23 Mar 2005 16:41:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 23 Mar 2005 16:41:04 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 23 17:41:02 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DE8l2-0003tW-Q8 for geh-help-gnu-emacs@m.gmane.org; Wed, 23 Mar 2005 17:31:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DE92Z-0005gR-Fm for geh-help-gnu-emacs@m.gmane.org; Wed, 23 Mar 2005 11:49:07 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DE92H-0005fR-RZ for help-gnu-emacs@gnu.org; Wed, 23 Mar 2005 11:48:50 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DE92F-0005e5-FG for help-gnu-emacs@gnu.org; Wed, 23 Mar 2005 11:48:47 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DE92F-0005d6-64 for help-gnu-emacs@gnu.org; Wed, 23 Mar 2005 11:48:47 -0500 Original-Received: from [146.6.139.124] (helo=dell3.ma.utexas.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DE8jj-0001Yv-Im for help-gnu-emacs@gnu.org; Wed, 23 Mar 2005 11:29:39 -0500 Original-Received: from lab45.ma.utexas.edu (mail@lab45.ma.utexas.edu [128.83.133.159]) by dell3.ma.utexas.edu (8.11.0.Beta3/8.10.2) with ESMTP id j2NGTcC21100; Wed, 23 Mar 2005 10:29:38 -0600 Original-Received: from jcorneli by lab45.ma.utexas.edu with local (Exim 3.36 #1 (Debian)) id 1DE8ji-0007yg-00; Wed, 23 Mar 2005 10:29:38 -0600 Original-To: help-gnu-emacs@gnu.org In-reply-to: (message from Mark Plaksin on Wed, 23 Mar 2005 08:08:51 -0500) 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 X-MailScanner-To: geh-help-gnu-emacs@m.gmane.org Xref: news.gmane.org gmane.emacs.help:25113 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:25113 Adapted from w3m-filter.el: (while (re-search-forward "&#\\([0-9]+\\);" nil t) (setq ucs (string-to-number (match-string 1))) (delete-region (match-beginning 0) (match-end 0)) (insert-char ucs 1)) This would appear to work if the characters themselves were recognized... But when I run this expression on a buffer containing the string "玄奘" what I get is an error, like this: Debugger entered--Lisp error: (error "Invalid character: 071604, 29572, 0x7384") insert-char(29572 1) What do I have to do to make emacs know to treat these things as characters?