--- /dev/null
+;;; ideo-trans.el --- Translation utility for Ideographic Strings
+
+;; Copyright (C) 2003 MORIOKA Tomohiko
+
+;; Author: MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
+;; Keywords: Ideographs, Character Database, Chaon, CHISE
+
+;; This file is a part of tomoyo-tools.
+
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation; either version 2, or (at
+;; your option) any later version.
+
+;; This program is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program; see the file COPYING. If not, write to
+;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Code:
+
+;;;###autoload
+(defun ideo-trans-simplify-chinese-string (string)
+ "Simplify Chinese traditional characters in STRING."
+ (let (uchr ret)
+ (mapconcat
+ (lambda (chr)
+ (setq uchr
+ (if (setq ret (or (char-ucs chr)
+ (get-char-attribute chr '=>ucs@gb)))
+ (decode-char '=ucs ret)
+ chr))
+ (char-to-string
+ (if (setq ret (encode-char uchr 'chinese-gb12345))
+ (decode-char 'chinese-gb2312 ret)
+ chr)))
+ string "")))
+
+
+;;; @ End.
+;;;
+
+(provide 'ideo-trans)
+
+;;; ideo-trans.el ends here