[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: making "玄奘" say "Xuanzang" in chinese

From: Joe Corneli
Subject: Re: making "玄奘" say "Xuanzang" in chinese
Date: Wed, 23 Mar 2005 10:29:38 -0600

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?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]