all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Joe Corneli <jcorneli@math.utexas.edu>
Subject: Re: making "&#29572;&#22872;" say "Xuanzang" in chinese
Date: Wed, 23 Mar 2005 10:29:38 -0600	[thread overview]
Message-ID: <E1DE8ji-0007yg-00@lab45.ma.utexas.edu> (raw)
In-Reply-To: <m3u0n2v7a4.fsf@water.tss.usg.edu> (message from Mark Plaksin on Wed, 23 Mar 2005 08:08:51 -0500)

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
"&#29572;&#22872;" 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?

  parent reply	other threads:[~2005-03-23 16:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-23  3:14 making "&#29572;&#22872;" say "Xuanzang" in chinese Joe Corneli
2005-03-23 13:08 ` Mark Plaksin
2005-03-23 15:56   ` Joe Corneli
2005-03-23 16:29   ` Joe Corneli [this message]
     [not found]   ` <mailman.20.1111596532.28103.help-gnu-emacs@gnu.org>
2005-03-24 20:07     ` Miles Bader
2005-03-25  1:07       ` Joe Corneli
2005-03-25  2:16         ` Miles Bader

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1DE8ji-0007yg-00@lab45.ma.utexas.edu \
    --to=jcorneli@math.utexas.edu \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.