From a5492329a695dacd70f94c7ac9fcd91493223228 Mon Sep 17 00:00:00 2001 From: tomo Date: Fri, 20 Feb 1998 10:22:39 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create tag 'egg-980220'. --- euc-china.el | 484 ---------------------------------------------------------- euc-cn.el | 449 ----------------------------------------------------- 2 files changed, 933 deletions(-) delete mode 100644 euc-china.el delete mode 100644 euc-cn.el diff --git a/euc-china.el b/euc-china.el deleted file mode 100644 index ebcfb00..0000000 --- a/euc-china.el +++ /dev/null @@ -1,484 +0,0 @@ -;;; euc-china.el --- Fixed EUC-CN/TW handling routines. - -;; Copyright (C) 1997, 1998 Mule Project, -;; Powered by Electrotechnical Laboratory, JAPAN. -;; Project Leader: Satoru Tomura - -;; Author: KATAYAMA Yoshio -;; Maintainer: KATAYAMA Yoshio -;; Keywords: mule, multilingual, input method, chinese - -;; This file will be part of GNU Emacs (in future). - -;; EGG 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. - -;; EGG 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 GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;;; Commentary: - - -;;; Code: - -(defvar egg-zhuyin nil) - -(defconst yincode-pinyin-shengmu - '(("" . 0) ("B" . 1) ("C" . 2) ("Ch" . 3) ("D" . 4) - ("F" . 5) ("G" . 6) ("H" . 7) ("J" . 8) ("K" . 9) - ("L" . 10) ("M" . 11) ("N" . 12) ("P" . 13) ("Q" . 14) - ("R" . 15) ("S" . 16) ("Sh" . 17) ("T" . 18) ("W" . 19) - ("X" . 20) ("Y" . 21) ("Z" . 22) ("Zh" . 23))) - -(defconst yincode-pinyin-yunmu - '(("(0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B" 11 7) - ("ia(0@(B" 12 0) ("i(0!@(B" 12 1) ("i(0"@(B" 12 3) ("i(0#@(B" 12 5) ("i(0$@(B" 12 7) - ("ian(0@(B" 13 0) ("i(0!(Bn(0@(B" 13 1) ("i(0"(Bn(0@(B" 13 3) ("i(0#(Bn(0@(B" 13 5) ("i(0$(Bn(0@(B" 13 7) - ("iang(0@(B" 14 0) ("i(0!(Bng(0@(B" 14 1) ("i(0"(Bng(0@(B" 14 3) ("i(0#(Bng(0@(B" 14 5) ("i(0$(Bng(0@(B" 14 7) - ("iao(0@(B" 15 0) ("i(0!(Bo(0@(B" 15 1) ("i(0"(Bo(0@(B" 15 3) ("i(0#(Bo(0@(B" 15 5) ("i(0$(Bo(0@(B" 15 7) - ("ie(0@(B" 16 0) ("i(0%@(B" 16 1) ("i(0&@(B" 16 3) ("i(0'@(B" 16 5) ("i(0(@(B" 16 7) - ("in(0@(B" 17 0) ("(0)(Bn(0@(B" 17 1) ("(0*(Bn(0@(B" 17 3) ("(0+(Bn(0@(B" 17 5) ("(0,(Bn(0@(B" 17 7) - ("ing(0@(B" 18 0) ("(0)(Bng(0@(B" 18 1) ("(0*(Bng(0@(B" 18 3) ("(0+(Bng(0@(B" 18 5) ("(0,(Bng(0@(B" 18 7) - ("iong(0@(B" 19 0) ("i(0-(Bng(0@(B" 19 1) ("i(0.(Bng(0@(B" 19 3) ("i(0/(Bng(0@(B" 19 5) ("i(00(Bng(0@(B" 19 7) - ("iu(0@(B" 20 0) ("i(01@(B" 20 1) ("i(02@(B" 20 3) ("i(03@(B" 20 5) ("i(04@(B" 20 7) - ("m(0@(B" 21 0) ("m(0@(B" 21 1) ("m(0@(B" 21 3) ("m(0@(B" 21 5) ("m(0@(B" 21 7) - ("n(0@(B" 22 0) ("n(0@(B" 22 1) ("(0=@(B" 22 3) ("(0>@(B" 22 5) ("(0?@(B" 22 7) - ("ng(0@(B" 23 0) ("ng(0@(B" 23 1) ("ng(0@(B" 23 3) ("ng(0@(B" 23 5) ("ng(0@(B" 23 7) - ("o(0@(B" 24 0) ("(0-@(B" 24 1) ("(0.@(B" 24 3) ("(0/@(B" 24 5) ("(00@(B" 24 7) - ("ong(0@(B" 25 0) ("(0-(Bng(0@(B" 25 1) ("(0.(Bng(0@(B" 25 3) ("(0/(Bng(0@(B" 25 5) ("(00(Bng(0@(B" 25 7) - ("ou(0@(B" 26 0) ("(0-(Bu(0@(B" 26 1) ("(0.(Bu(0@(B" 26 3) ("(0/(Bu(0@(B" 26 5) ("(00(Bu(0@(B" 26 7) - ("u(0@(B" 27 0) ("(01@(B" 27 1) ("(02@(B" 27 3) ("(03@(B" 27 5) ("(04@(B" 27 7) - ("ua(0@(B" 28 0) ("u(0!@(B" 28 1) ("u(0"@(B" 28 3) ("u(0#@(B" 28 5) ("u(0$@(B" 28 7) - ("uai(0@(B" 29 0) ("u(0!(Bi(0@(B" 29 1) ("u(0"(Bi(0@(B" 29 3) ("u(0#(Bi(0@(B" 29 5) ("u(0$(Bi(0@(B" 29 7) - ("uan(0@(B" 30 0) ("u(0!(Bn(0@(B" 30 1) ("u(0"(Bn(0@(B" 30 3) ("u(0#(Bn(0@(B" 30 5) ("u(0$(Bn(0@(B" 30 7) - ("uang(0@(B" 31 0) ("u(0!(Bng(0@(B" 31 1) ("u(0"(Bng(0@(B" 31 3) ("u(0#(Bng(0@(B" 31 5) ("u(0$(Bng(0@(B" 31 7) - ("ue(0@(B" 32 0) ("u(0%@(B" 32 1) ("u(0&@(B" 32 3) ("u(0'@(B" 32 5) ("u(0(@(B" 32 7) - ("ui(0@(B" 33 0) ("u(0)@(B" 33 1) ("u(0*@(B" 33 3) ("u(0+@(B" 33 5) ("u(0,@(B" 33 7) - ("un(0@(B" 34 0) ("(01(Bn(0@(B" 34 1) ("(02(Bn(0@(B" 34 3) ("(03(Bn(0@(B" 34 5) ("(04(Bn(0@(B" 34 7) - ("uo(0@(B" 35 0) ("u(0-@(B" 35 1) ("u(0.@(B" 35 3) ("u(0/@(B" 35 5) ("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0 0 0 0 1 1 1 0 0 1 0 0 1 1 1 0 0 1 - 0 1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 1 1 1 0 0 1 - ]) - -(defconst yincode-zhuyin-shengmu - '(("" . 0) ("(0E(B" . 1) ("(0X(B" . 2) ("(0T(B" . 3) ("(0I(B" . 4) - ("(0H(B" . 5) ("(0M(B" . 6) ("(0O(B" . 7) ("(0P(B" . 8) ("(0N(B" . 9) - ("(0L(B" . 10) ("(0G(B" . 11) ("(0K(B" . 12) ("(0F(B" . 13) ("(0Q(B" . 14) - ("(0V(B" . 15) ("(0Y(B" . 16) ("(0U(B" . 17) ("(0J(B" . 18) ("(0h(B" . 19) - ("(0R(B" . 20) ("(0g(B" . 21) ("(0W(B" . 22) ("(0S(B" . 23))) - -(defconst yincode-zhuyin-yunmu - '(("(0@(B" 0 0) ("(0A(B" 0 1) ("(0B(B" 0 3) ("(0C(B" 0 5) ("(0D(B" 0 7) ; i - ("(0Z@(B" 1 0) ("(0ZA(B" 1 1) ("(0ZB(B" 1 3) ("(0ZC(B" 1 5) ("(0ZD(B" 1 7) ; a - ("(0^@(B" 2 0) ("(0^A(B" 2 1) ("(0^B(B" 2 3) ("(0^C(B" 2 5) ("(0^D(B" 2 7) ; ai - ("(0b@(B" 3 0) ("(0bA(B" 3 1) ("(0bB(B" 3 3) ("(0bC(B" 3 5) ("(0bD(B" 3 7) ; an - ("(0d@(B" 4 0) ("(0dA(B" 4 1) ("(0dB(B" 4 3) ("(0dC(B" 4 5) ("(0dD(B" 4 7) ; ang - ("(0`@(B" 5 0) ("(0`A(B" 5 1) ("(0`B(B" 5 3) ("(0`C(B" 5 5) ("(0`D(B" 5 7) ; ao - ("(0\@(B" 6 0) ("(0\A(B" 6 1) ("(0\B(B" 6 3) ("(0\C(B" 6 5) ("(0\D(B" 6 7) ; e - ("(0_@(B" 7 0) ("(0_A(B" 7 1) ("(0_B(B" 7 3) ("(0_C(B" 7 5) ("(0_D(B" 7 7) ; ei - ("(0c@(B" 8 0) ("(0cA(B" 8 1) ("(0cB(B" 8 3) ("(0cC(B" 8 5) ("(0cD(B" 8 7) ; en - ("(0e@(B" 9 0) ("(0eA(B" 9 1) ("(0eB(B" 9 3) ("(0eC(B" 9 5) ("(0eD(B" 9 7) ; eng - ("(0f@(B" 10 0) ("(0fA(B" 10 1) ("(0fB(B" 10 3) ("(0fC(B" 10 5) ("(0fD(B" 10 7) ; er - ("(0g@(B" 11 0) ("(0gA(B" 11 1) ("(0gB(B" 11 3) ("(0gC(B" 11 5) ("(0gD(B" 11 7) ; i - ("(0gZ@(B" 12 0) ("(0gZA(B" 12 1) ("(0gZB(B" 12 3) ("(0gZC(B" 12 5) ("(0gZD(B" 12 7) ; ia - ("(0gb@(B" 13 0) ("(0gbA(B" 13 1) ("(0gbB(B" 13 3) ("(0gbC(B" 13 5) ("(0gbD(B" 13 7) ; ian - ("(0gd@(B" 14 0) ("(0gdA(B" 14 1) ("(0gdB(B" 14 3) ("(0gdC(B" 14 5) ("(0gdD(B" 14 7) ; iang - ("(0g`@(B" 15 0) ("(0g`A(B" 15 1) ("(0g`B(B" 15 3) ("(0g`C(B" 15 5) ("(0g`D(B" 15 7) ; iao - ("(0g]@(B" 16 0) ("(0g]A(B" 16 1) ("(0g]B(B" 16 3) ("(0g]C(B" 16 5) ("(0g]D(B" 16 7) ; ie - ("(0gc@(B" 17 0) ("(0gcA(B" 17 1) ("(0gcB(B" 17 3) ("(0gcC(B" 17 5) ("(0gcD(B" 17 7) ; in - ("(0ge@(B" 18 0) ("(0geA(B" 18 1) ("(0geB(B" 18 3) ("(0geC(B" 18 5) ("(0geD(B" 18 7) ; ing - ("(0ie@(B" 19 0) ("(0ieA(B" 19 1) ("(0ieB(B" 19 3) ("(0ieC(B" 19 5) ("(0ieD(B" 19 7) ; iong - ("(0ga@(B" 20 0) ("(0gaA(B" 20 1) ("(0gaB(B" 20 3) ("(0gaC(B" 20 5) ("(0gaD(B" 20 7) ; iu - ("(0G@(B" 21 0) ("(0GA(B" 21 1) ("(0GB(B" 21 3) ("(0GC(B" 21 5) ("(0GD(B" 21 7) ; m - ("(0K@(B" 22 0) ("(0KA(B" 22 1) ("(0KB(B" 22 3) ("(0KC(B" 22 5) ("(0KD(B" 22 7) ; n - ("@(0@(B" 23 0) ("@(0A(B" 23 1) ("@(0B(B" 23 3) ("@(0C(B" 23 5) ("@(0D(B" 23 7) ; ng - ("(0[@(B" 24 0) ("(0[A(B" 24 1) ("(0[B(B" 24 3) ("(0[C(B" 24 5) ("(0[D(B" 24 7) ; o - ("(0he@(B" 25 0) ("(0heA(B" 25 1) ("(0heB(B" 25 3) ("(0heC(B" 25 5) ("(0heD(B" 25 7) ; ong - ("(0a@(B" 26 0) ("(0aA(B" 26 1) ("(0aB(B" 26 3) ("(0aC(B" 26 5) ("(0aD(B" 26 7) ; ou - ("(0h@(B" 27 0) ("(0hA(B" 27 1) ("(0hB(B" 27 3) ("(0hC(B" 27 5) ("(0hD(B" 27 7) ; u - ("(0hZ@(B" 28 0) ("(0hZA(B" 28 1) ("(0hZB(B" 28 3) ("(0hZC(B" 28 5) ("(0hZD(B" 28 7) ; ua - ("(0h^@(B" 29 0) ("(0h^A(B" 29 1) ("(0h^B(B" 29 3) ("(0h^C(B" 29 5) ("(0h^D(B" 29 7) ; uai - ("(0hb@(B" 30 0) ("(0hbA(B" 30 1) ("(0hbB(B" 30 3) ("(0hbC(B" 30 5) ("(0hbD(B" 30 7) ; uan - ("(0hd@(B" 31 0) ("(0hdA(B" 31 1) ("(0hdB(B" 31 3) ("(0hdC(B" 31 5) ("(0hdD(B" 31 7) ; uang - ("(0i]@(B" 37 0) ("(0i]A(B" 37 1) ("(0i]B(B" 37 3) ("(0i]C(B" 37 5) ("(0i]D(B" 37 7) ; ue - ("(0h_@(B" 33 0) ("(0h_A(B" 33 1) ("(0h_B(B" 33 3) ("(0h_C(B" 33 5) ("(0h_D(B" 33 7) ; ui - ("(0hc@(B" 34 0) ("(0hcA(B" 34 1) ("(0hcB(B" 34 3) ("(0hcC(B" 34 5) ("(0hcD(B" 34 7) ; un - ("(0h[@(B" 35 0) ("(0h[A(B" 35 1) ("(0h[B(B" 35 3) ("(0h[C(B" 35 5) ("(0h[D(B" 35 7) ; uo - ("(0i@(B" 36 0) ("(0iA(B" 36 1) ("(0iB(B" 36 3) ("(0iC(B" 36 5) ("(0iD(B" 36 7) ; (09(B - ("(0i]@(B" 37 0) ("(0i]A(B" 37 1) ("(0i]B(B" 37 3) ("(0i]C(B" 37 5) ("(0i]D(B" 37 7) ; (09(Be - ("0(0@(B" 38 0) ("1(0A(B" 38 1) ("2(0B(B" 38 3) ("3(0C(B" 38 5) ("4(0D(B" 38 7) ; undefined - ("(0ib@(B" 39 0) ("(0ibA(B" 39 1) ("(0ibB(B" 39 3) ("(0ibC(B" 39 5) ("(0ibD(B" 39 7) ; (09(Ban - ("(0ic@(B" 40 0) ("(0icA(B" 40 1) ("(0icB(B" 40 3) ("(0icC(B" 40 5) ("(0icD(B" 40 7) ; (09(Bn - )) - -(defconst yincode-zhuyin-table - [ - ;; empty ShengMu - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x8000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x9586 ?\x0000 ?\x9592 ?\x9599 - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x8000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x959b ?\x95a0 ?\x0000 ?\x959e - ?\x95a2 - ;; ShengMu B - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 - ?\x0000 ?\x8000 ?\x0000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu C - ?\x828b ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x0000 ?\x0280 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 - ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu Ch - ?\x838b ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 - ?\x0000 ?\x0380 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x8000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu D - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x0000 ?\x8000 ?\x0000 - ?\x8000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 - ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu F - ?\x0000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu G - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x8000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu H - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x8000 ?\x0000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x8000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu J - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x8000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x08a4 ?\x0000 ?\x0000 - ?\x08a7 ?\x0000 ?\x08a5 ?\x0000 ?\x08a8 ?\x0000 ?\x889b ?\x88a0 ?\x8000 ?\x889e - ?\x88a2 - ;; ShengMu K - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x8000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu L - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x8000 - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 - ?\x8000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 - ?\x8000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu M - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x0000 ?\x8000 ?\x0000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 - ?\x8000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu N - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x0000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 - ?\x8000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 - ?\x8000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu P - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 - ?\x0000 ?\x8000 ?\x0000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu Q - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x8000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0ea4 ?\x0000 ?\x0000 - ?\x0ea7 ?\x0000 ?\x0ea5 ?\x0000 ?\x0ea8 ?\x0000 ?\x8e9b ?\x8ea0 ?\x8000 ?\x8e9e - ?\x8ea2 - ;; ShengMu R - ?\x8f8b ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 - ?\x0000 ?\x0f80 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 - ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu S - ?\x908b ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 - ?\x0000 ?\x1080 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 - ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu Sh - ?\x918b ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x0000 ?\x1180 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x8000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu T - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x8000 - ?\x0000 ?\x8000 ?\x0000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 - ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu W - ?\x939b ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 ?\x0000 ?\x1380 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu X - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x8000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x14a4 ?\x0000 ?\x0000 - ?\x14a7 ?\x0000 ?\x14a5 ?\x0000 ?\x14a8 ?\x0000 ?\x949b ?\x94a0 ?\x8000 ?\x949e - ?\x94a2 - ;; ShengMu Y - ?\x958b ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0090 ?\x0000 ?\x9591 ?\x9592 - ?\x0000 ?\x1580 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x1588 ?\x1589 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x0093 ?\x8000 ?\x00a4 ?\x0000 ?\x0000 - ?\x00a7 ?\x0000 ?\x00a5 ?\x0000 ?\x00a8 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu Z - ?\x968b ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x0000 ?\x1680 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 - ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu Zh - ?\x978b ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x0000 ?\x1780 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x8000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ]) - -(defun egg-chinese-syllable (str &optional start) - (if start - (setq str (substring str start))) - (or (car (egg-pinyin-syllable str)) - (car (egg-zhuyin-syllable str)))) - -(defsubst egg-make-fixed-euc-china-code (s y) - (concat (list - (+ (* 2 (nth 1 y)) (logand (nth 2 y) 1) 32) - (+ (* 4 (if (= s 0) 20 s)) (lsh (nth 2 y) -1) 156)))) - -(defun egg-pinyin-syllable (str) - (let (s y end) - (if (string-match "^[A-Za-z(0!(B-(0?(B]+(0@(B" str) - (progn - (setq end (match-end 0)) - (cond - ((setq s (cdr (assoc (substring str 0 2) yincode-pinyin-shengmu))) - (setq y (substring str 2 end))) - ((setq s (cdr (assoc (substring str 0 1) yincode-pinyin-shengmu))) - (setq y (substring str 1 end))) - (t - (setq s 0 y (substring str 0 end)))) - (if (and (setq y (assoc y yincode-pinyin-yunmu)) - (= (aref yincode-pinyin-table (+ (* 39 s) (nth 1 y))) 1)) - (cons end (egg-make-fixed-euc-china-code s y))))))) - -(defun egg-zhuyin-syllable (str) - (let (end s y c z (zhuyin-len (charset-bytes 'chinese-sisheng))) - (if (string-match "^[(0E(B-(0i(B@0-4]+[(0@ABCD(B]" str) - (progn - (setq end (match-end 0) - c (substring str 0 zhuyin-len) - s (cdr (assoc c yincode-zhuyin-shengmu)) - y (assoc (substring str zhuyin-len end) yincode-zhuyin-yunmu)) - (if (null (and s y)) - (setq s 0 - y (assoc (substring str 0 end) yincode-zhuyin-yunmu))) - (if (and y - (setq z (aref yincode-zhuyin-table (+ (* 41 s) (nth 1 y)))) - (/= (logand z ?\x8000) 0)) - (if (/= (logand z ?\x80) 0) - (cons end (egg-make-fixed-euc-china-code - (logand (lsh z -8) ?\x7f) - (list nil (logand z ?\x7f) (nth 2 y)))) - (cons end (egg-make-fixed-euc-china-code s y)))))))) - -(defun encode-fixed-euc-china-region (beg end type) - "Encode the text in the region to EUC-CN/TW." - (let (s syl c cset (maxlen (max (length "Zhu(0!(Bng(0@(B") (length "(0ShdA(B")))) - (save-excursion - (save-restriction - (narrow-to-region beg end) - (goto-char (point-min)) - (while (< (point) (point-max)) - (setq s (buffer-substring (point) - (min (+ (point) maxlen) (point-max)))) - (cond - ((setq syl (egg-pinyin-syllable s)) - (delete-region (point) (+ (point) (car syl))) - (insert (cdr syl))) - ((setq syl (egg-zhuyin-syllable s)) - (delete-region (point) (+ (point) (car syl))) - (insert (cdr syl))) - (t - (setq c (split-char (following-char)) - cset (car c)) - (cond - ((or (and (eq cset 'chinese-gb2312) (eq type 'cn)) - (and (eq cset 'chinese-cns11643-1) (eq type 'tw))) - (delete-char 1) - (insert (+ (nth 1 c) 128) (+ (nth 2 c) 128))) - ((and (eq cset 'chinese-cns11643-2) (eq type 'tw)) - (delete-char 1) - (insert (+ (nth 1 c) 128) (nth 2 c))) - ((eq cset 'chinese-sisheng) - (delete-char 1) - (insert 0 (+ (nth 1 c) 128))) - (t - (delete-region (point) (1+ (point))) - (insert 0 (nth 1 c))))))) - (- (point-max) (point-min)))))) - -(defun pre-write-encode-fixed-euc-china (from to type) - (let ((buf (current-buffer)) - (work (get-buffer-create " *pre-write-encoding-work*"))) - (set-buffer work) - (erase-buffer) - (if (stringp from) - (insert from) - (insert-buffer-substring buf from to)) - (encode-fixed-euc-china-region 1 (point-max) type) - nil)) - -(defun pre-write-encode-euc-cn (from to) - (pre-write-encode-fixed-euc-china from to 'cn)) - -(defun pre-write-encode-euc-tw (from to) - (pre-write-encode-fixed-euc-china from to 'tw)) - -(defun decode-fixed-euc-china-region (beg end type) - "Decode EUC-CN/TW encoded text in the region. -Return the length of resulting text." - (interactive "r") - (prog1 - (let (c0 c1 s y ss) - (save-restriction - (narrow-to-region beg end) - (goto-char (point-min)) - (while (< (point) (point-max)) - (setq c1 (buffer-substring (point) (+ (point) 2)) - c0 (aref c1 0) - c1 (aref c1 1)) - (delete-region (point) (+ (point) 2)) - (cond - ((eq c0 0) - (if (> c1 ?\xa0) - (insert leading-code-private-11 - (charset-id 'chinese-sisheng) - c1) - (insert c1))) - ((>= c0 ?\x80) - (cond - ((eq type 'cn) - (insert (charset-id 'chinese-gb2312) c0 (logior c1 ?\x80))) - ((>= c0 ?\x80) - (insert (charset-id 'chinese-cns11643-1) c0 c1)) - (t - (insert (charset-id 'chinese-cns11643-2) c0 (+ c1 ?\x80))))) - (t - (setq c1 (logand c1 ?\x7f)) - (setq s (- (lsh c1 -2) 7) ;;(+ (lsh (- c1 32) -2) 1) - y (- (lsh c0 -1) 16) ;;(lsh (- c0 32) -1) - ss (+ (logand c0 1) (logand c1 3))) - (if egg-zhuyin - (progn - (setq c0 (aref yincode-zhuyin-table (+ (* 41 s) y))) - (if (eq (logand c0 ?\x8080) ?\x80) - (setq s (lsh c0 -8) - y (logand c0 ?\x7f))) - (if (and (eq s 20) - (eq (aref yincode-pinyin-table (+ (* 39 s) y)) 0)) - (setq s 0)) - (insert (car (nth s yincode-zhuyin-shengmu)) - (car (nth (+ (* 5 y) ss) yincode-zhuyin-yunmu)))) - (if (and (eq s 20) - (eq (aref yincode-pinyin-table (+ (* 39 s) y)) 0)) - (setq s 0)) - (insert (car (nth s yincode-pinyin-shengmu)) - (car (nth (+ (* 5 y) ss) yincode-pinyin-yunmu))))))) - (- (point-max) (point-min)))) - (if (looking-at "\0\0") (forward-char 2)))) - -(defun post-read-decode-fixed-euc-china (len type) - (let ((pos (point)) - (buffer-modified-p (buffer-modified-p))) - (prog1 - (decode-fixed-euc-china-region pos (+ pos len) type) - (set-buffer-modified-p buffer-modified-p)))) - -(defun post-read-decode-euc-cn (len) - (post-read-decode-fixed-euc-china len 'cn)) - -(defun post-read-decode-euc-tw (len) - (post-read-decode-fixed-euc-china len 'tw)) - -(make-coding-system 'fixed-euc-cn 5 ?W "Coding System for fixed EUC Chinese-gb2312") -(put 'fixed-euc-cn 'pre-write-conversion 'pre-write-encode-euc-cn) -(put 'fixed-euc-cn 'post-read-conversion 'post-read-decode-euc-cn) - -(make-coding-system 'fixed-euc-tw 5 ?W "Coding System for fixed EUC Chinese-cns11643") -(put 'fixed-euc-tw 'pre-write-conversion 'pre-write-encode-euc-tw) -(put 'fixed-euc-tw 'post-read-conversion 'post-read-decode-euc-tw) - -;;; euc-china.el ends here. diff --git a/euc-cn.el b/euc-cn.el deleted file mode 100644 index e001daa..0000000 --- a/euc-cn.el +++ /dev/null @@ -1,449 +0,0 @@ -;;; euc-cn.el --- Fixed EUC-CN handling routines. - -;; Copyright (C) 1997 Mule Project, -;; Powered by Electrotechnical Laboratory, JAPAN. -;; Project Leader: Satoru Tomura - -;; Author: KATAYAMA Yoshio -;; Maintainer: KATAYAMA Yoshio -;; Keywords: mule, multilingual, input method, chinese - -;; This file will be part of GNU Emacs (in future). - -;; GNU Emacs 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. - -;; GNU Emacs 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 GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;;; Commentary: - - -;;; Code: - -(defvar cwnn-zhuyin nil) - -(defconst chinese-sisheng-leading-chars - (concat (char-to-string (aref (charset-info 'chinese-sisheng) 6)) - (char-to-string (aref (charset-info 'chinese-sisheng) 7)))) -(defconst yincoding-pinyin-shengmu - '(("" . 0) ("B" . 1) ("C" . 2) ("Ch" . 3) ("D" . 4) - ("F" . 5) ("G" . 6) ("H" . 7) ("J" . 8) ("K" . 9) - ("L" . 10) ("M" . 11) ("N" . 12) ("P" . 13) ("Q" . 14) - ("R" . 15) ("S" . 16) ("Sh" . 17) ("T" . 18) ("W" . 19) - ("X" . 20) ("Y" . 21) ("Z" . 22) ("Zh" . 23))) - -(defconst yincoding-pinyin-yunmu - '(("(0@(B" 0) ("(0@(B" 0 0) ("(0@(B" 0 1) ("(0@(B" 0 2) ("(0@(B" 0 3) - ("a(0@(B" 1) ("(0!@(B" 1 0) ("(0"@(B" 1 1) ("(0#@(B" 1 2) ("(0$@(B" 1 3) - ("ai(0@(B" 2) ("(0!(Bi(0@(B" 2 0) ("(0"(Bi(0@(B" 2 1) ("(0#(Bi(0@(B" 2 2) ("(0$(Bi(0@(B" 2 3) - ("an(0@(B" 3) ("(0!(Bn(0@(B" 3 0) ("(0"(Bn(0@(B" 3 1) ("(0#(Bn(0@(B" 3 2) ("(0$(Bn(0@(B" 3 3) - ("ang(0@(B" 4) ("(0!(Bng(0@(B" 4 0) ("(0"(Bng(0@(B" 4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("i(0%@(B" 16 0) ("i(0&@(B" 16 1) ("i(0'@(B" 16 2) ("i(0(@(B" 16 3) - ("in(0@(B" 17) ("(0)(Bn(0@(B" 17 0) ("(0*(Bn(0@(B" 17 1) ("(0+(Bn(0@(B" 17 2) ("(0,(Bn(0@(B" 17 3) - ("ing(0@(B" 18) ("(0)(Bng(0@(B" 18 0) ("(0*(Bng(0@(B" 18 1) ("(0+(Bng(0@(B" 18 2) ("(0,(Bng(0@(B" 18 3) - ("iong(0@(B" 19) ("i(0-(Bng(0@(B" 19 0) ("i(0.(Bng(0@(B" 19 1) ("i(0/(Bng(0@(B" 19 2) ("i(00(Bng(0@(B" 19 3) - ("iu(0@(B" 20) ("i(01@(B" 20 0) ("i(02@(B" 20 1) ("i(03@(B" 20 2) ("i(04@(B" 20 3) - ("m(0@(B" 21) ("m(0@(B" 21 0) ("m(0@(B" 21 1) ("m(0@(B" 21 2) ("m(0@(B" 21 3) - ("n(0@(B" 22) ("n(0@(B" 22 0) ("(0=@(B" 22 1) ("(0>@(B" 22 2) ("(0?@(B" 22 3) - ("ng(0@(B" 23) ("ng(0@(B" 23 0) ("ng(0@(B" 23 1) ("ng(0@(B" 23 2) ("ng(0@(B" 23 3) - ("o(0@(B" 24) ("(0-@(B" 24 0) ("(0.@(B" 24 1) ("(0/@(B" 24 2) ("(00@(B" 24 3) - ("ong(0@(B" 25) ("(0-(Bng(0@(B" 25 0) ("(0.(Bng(0@(B" 25 1) ("(0/(Bng(0@(B" 25 2) ("(00(Bng(0@(B" 25 3) - ("ou(0@(B" 26) ("(0-(Bu(0@(B" 26 0) ("(0.(Bu(0@(B" 26 1) ("(0/(Bu(0@(B" 26 2) ("(00(Bu(0@(B" 26 3) - ("u(0@(B" 27) ("(01@(B" 27 0) ("(02@(B" 27 1) ("(03@(B" 27 2) ("(04@(B" 27 3) - ("ua(0@(B" 28) ("u(0!@(B" 28 0) ("u(0"@(B" 28 1) ("u(0#@(B" 28 2) ("u(0$@(B" 28 3) - ("uai(0@(B" 29) ("u(0!(Bi(0@(B" 29 0) ("u(0"(Bi(0@(B" 29 1) ("u(0#(Bi(0@(B" 29 2) ("u(0$(Bi(0@(B" 29 3) - ("uan(0@(B" 30) ("u(0!(Bn(0@(B" 30 0) ("u(0"(Bn(0@(B" 30 1) ("u(0#(Bn(0@(B" 30 2) ("u(0$(Bn(0@(B" 30 3) - ("uang(0@(B" 31) ("u(0!(Bng(0@(B" 31 0) ("u(0"(Bng(0@(B" 31 1) ("u(0#(Bng(0@(B" 31 2) ("u(0$(Bng(0@(B" 31 3) - ("ue(0@(B" 32) ("u(0%@(B" 32 0) ("u(0&@(B" 32 1) ("u(0'@(B" 32 2) ("u(0(@(B" 32 3) - ("ui(0@(B" 33) ("u(0)@(B" 33 0) ("u(0*@(B" 33 1) ("u(0+@(B" 33 2) ("u(0,@(B" 33 3) - ("un(0@(B" 34) ("(01(Bn(0@(B" 34 0) ("(02(Bn(0@(B" 34 1) ("(03(Bn(0@(B" 34 2) ("(04(Bn(0@(B" 34 3) - ("uo(0@(B" 35) ("u(0-@(B" 35 0) ("u(0.@(B" 35 1) ("u(0/@(B" 35 2) ("u(00@(B" 35 3) - ("(09@(B" 36) ("(05@(B" 36 0) ("(06@(B" 36 1) ("(07@(B" 36 2) ("(08@(B" 36 3) - ("(09(Be(0@(B" 37) ("(09%@(B" 37 0) ("(09&@(B" 37 1) ("(09'@(B" 37 2) ("(09(@(B" 37 3) - ("0(0@(B" 38) ("1(0@(B" 38 0) ("2(0@(B" 38 1) ("3(0@(B" 38 2) ("4(0@(B" 38 3))) - -(defconst yincoding-pinyin-table - [ - 0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 - 0 1 1 1 1 1 0 1 1 1 0 1 0 1 0 1 1 1 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 - 0 1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0 0 0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 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 1 0 0 1 1 1 0 0 1 - 0 1 1 1 1 1 1 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1 0 0 1 1 1 0 0 1 - 0 1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 1 1 1 0 0 1 - 0 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 1 0 1 0 0 0 0 0 0 1 1 1 0 0 1 0 0 1 1 1 0 0 1 - 0 1 1 1 1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 - 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 1 0 0 1 0 1 0 1 0 0 0 1 - 0 1 0 1 1 1 1 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 1 1 1 1 0 0 1 0 1 0 1 0 0 0 1 - 0 1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1 0 0 1 1 1 0 0 1 - 0 1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 1 1 1 0 0 1 - ]) - -(defconst yincoding-zhuyin-length (charset-bytes 'chinese-sisheng)) - -(defconst yincoding-zhuyin-shengmu - '(("" . 0) ("(0E(B" . 1) ("(0X(B" . 2) ("(0T(B" . 3) ("(0I(B" . 4) - ("(0H(B" . 5) ("(0M(B" . 6) ("(0O(B" . 7) ("(0P(B" . 8) ("(0N(B" . 9) - ("(0L(B" . 10) ("(0G(B" . 11) ("(0K(B" . 12) ("(0F(B" . 13) ("(0Q(B" . 14) - ("(0V(B" . 15) ("(0Y(B" . 16) ("(0U(B" . 17) ("(0J(B" . 18) ("(0h(B" . 19) - ("(0R(B" . 20) ("(0g(B" . 21) ("(0W(B" . 22) ("(0S(B" . 23))) - -(defconst yincoding-zhuyin-yunmu - '(("(0@(B" 0) ("(0A(B" 0 0) ("(0B(B" 0 1) ("(0C(B" 0 2) ("(0D(B" 0 3) ; i - ("(0Z@(B" 1) ("(0ZA(B" 1 0) ("(0ZB(B" 1 1) ("(0ZC(B" 1 2) ("(0ZD(B" 1 3) ; a - ("(0^@(B" 2) ("(0^A(B" 2 0) ("(0^B(B" 2 1) ("(0^C(B" 2 2) ("(0^D(B" 2 3) ; ai - ("(0b@(B" 3) ("(0bA(B" 3 0) ("(0bB(B" 3 1) ("(0bC(B" 3 2) ("(0bD(B" 3 3) ; an - ("(0d@(B" 4) ("(0dA(B" 4 0) ("(0dB(B" 4 1) ("(0dC(B" 4 2) ("(0dD(B" 4 3) ; ang - ("(0`@(B" 5) ("(0`A(B" 5 0) ("(0`B(B" 5 1) ("(0`C(B" 5 2) ("(0`D(B" 5 3) ; ao - ("(0\@(B" 6) ("(0\A(B" 6 0) ("(0\B(B" 6 1) ("(0\C(B" 6 2) ("(0\D(B" 6 3) ; e - ("(0_@(B" 7) ("(0_A(B" 7 0) ("(0_B(B" 7 1) ("(0_C(B" 7 2) ("(0_D(B" 7 3) ; ei - ("(0c@(B" 8) ("(0cA(B" 8 0) ("(0cB(B" 8 1) ("(0cC(B" 8 2) ("(0cD(B" 8 3) ; en - ("(0e@(B" 9) ("(0eA(B" 9 0) ("(0eB(B" 9 1) ("(0eC(B" 9 2) ("(0eD(B" 9 3) ; eng - ("(0f@(B" 10) ("(0fA(B" 10 0) ("(0fB(B" 10 1) ("(0fC(B" 10 2) ("(0fD(B" 10 3) ; er - ("(0g@(B" 11) ("(0gA(B" 11 0) ("(0gB(B" 11 1) ("(0gC(B" 11 2) ("(0gD(B" 11 3) ; i - ("(0gZ@(B" 12) ("(0gZA(B" 12 0) ("(0gZB(B" 12 1) ("(0gZC(B" 12 2) ("(0gZD(B" 12 3) ; ia - ("(0gb@(B" 13) ("(0gbA(B" 13 0) ("(0gbB(B" 13 1) ("(0gbC(B" 13 2) ("(0gbD(B" 13 3) ; ian - ("(0gd@(B" 14) ("(0gdA(B" 14 0) ("(0gdB(B" 14 1) ("(0gdC(B" 14 2) ("(0gdD(B" 14 3) ; iang - ("(0g`@(B" 15) ("(0g`A(B" 15 0) ("(0g`B(B" 15 1) ("(0g`C(B" 15 2) ("(0g`D(B" 15 3) ; iao - ("(0g]@(B" 16) ("(0g]A(B" 16 0) ("(0g]B(B" 16 1) ("(0g]C(B" 16 2) ("(0g]D(B" 16 3) ; ie - ("(0gc@(B" 17) ("(0gcA(B" 17 0) ("(0gcB(B" 17 1) ("(0gcC(B" 17 2) ("(0gcD(B" 17 3) ; in - ("(0ge@(B" 18) ("(0geA(B" 18 0) ("(0geB(B" 18 1) ("(0geC(B" 18 2) ("(0geD(B" 18 3) ; ing - ("(0ie@(B" 19) ("(0ieA(B" 19 0) ("(0ieB(B" 19 1) ("(0ieC(B" 19 2) ("(0ieD(B" 19 3) ; iong - ("(0ga@(B" 20) ("(0gaA(B" 20 0) ("(0gaB(B" 20 1) ("(0gaC(B" 20 2) ("(0gaD(B" 20 3) ; iu - ("(0G@(B" 21) ("(0GA(B" 21 0) ("(0GB(B" 21 1) ("(0GC(B" 21 2) ("(0GD(B" 21 3) ; m - ("(0K@(B" 22) ("(0KA(B" 22 0) ("(0KB(B" 22 1) ("(0KC(B" 22 2) ("(0KD(B" 22 3) ; n - ("@(0@(B" 23) ("@(0A(B" 23 0) ("@(0B(B" 23 1) ("@(0C(B" 23 2) ("@(0D(B" 23 3) ; ng - ("(0[@(B" 24) ("(0[A(B" 24 0) ("(0[B(B" 24 1) ("(0[C(B" 24 2) ("(0[D(B" 24 3) ; o - ("(0he@(B" 25) ("(0heA(B" 25 0) ("(0heB(B" 25 1) ("(0heC(B" 25 2) ("(0heD(B" 25 3) ; ong - ("(0a@(B" 26) ("(0aA(B" 26 0) ("(0aB(B" 26 1) ("(0aC(B" 26 2) ("(0aD(B" 26 3) ; ou - ("(0h@(B" 27) ("(0hA(B" 27 0) ("(0hB(B" 27 1) ("(0hC(B" 27 2) ("(0hD(B" 27 3) ; u - ("(0hZ@(B" 28) ("(0hZA(B" 28 0) ("(0hZB(B" 28 1) ("(0hZC(B" 28 2) ("(0hZD(B" 28 3) ; ua - ("(0h^@(B" 29) ("(0h^A(B" 29 0) ("(0h^B(B" 29 1) ("(0h^C(B" 29 2) ("(0h^D(B" 29 3) ; uai - ("(0hb@(B" 30) ("(0hbA(B" 30 0) ("(0hbB(B" 30 1) ("(0hbC(B" 30 2) ("(0hbD(B" 30 3) ; uan - ("(0hd@(B" 31) ("(0hdA(B" 31 0) ("(0hdB(B" 31 1) ("(0hdC(B" 31 2) ("(0hdD(B" 31 3) ; uang - ("(0i]@(B" 37) ("(0i]A(B" 37 0) ("(0i]B(B" 37 1) ("(0i]C(B" 37 2) ("(0i]D(B" 37 3) ; ue - ("(0h_@(B" 33) ("(0h_A(B" 33 0) ("(0h_B(B" 33 1) ("(0h_C(B" 33 2) ("(0h_D(B" 33 3) ; ui - ("(0hc@(B" 34) ("(0hcA(B" 34 0) ("(0hcB(B" 34 1) ("(0hcC(B" 34 2) ("(0hcD(B" 34 3) ; un - ("(0h[@(B" 35) ("(0h[A(B" 35 0) ("(0h[B(B" 35 1) ("(0h[C(B" 35 2) ("(0h[D(B" 35 3) ; uo - ("(0i@(B" 36) ("(0iA(B" 36 0) ("(0iB(B" 36 1) ("(0iC(B" 36 2) ("(0iD(B" 36 3) ; (09(B - ("(0i]@(B" 37) ("(0i]A(B" 37 0) ("(0i]B(B" 37 1) ("(0i]C(B" 37 2) ("(0i]D(B" 37 3) ; (09(Be - ("0(0@(B" 38) ("1(0A(B" 38 0) ("2(0B(B" 38 1) ("3(0C(B" 38 2) ("4(0D(B" 38 3) ; undefined YunMu - ("(0ib@(B" 39) ("(0ibA(B" 39 0) ("(0ibB(B" 39 1) ("(0ibC(B" 39 2) ("(0ibD(B" 39 3) ; (09(Ban - ("(0ic@(B" 40) ("(0icA(B" 40 0) ("(0icB(B" 40 1) ("(0icC(B" 40 2) ("(0icD(B" 40 3) ; (09(Bn - )) - -(defconst yincoding-zhuyin-table - [ - ;; empty ShengMu - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x8000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x9586 ?\x0000 ?\x9592 ?\x9599 - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x8000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x959b ?\x95a0 ?\x0000 ?\x959e - ?\x95a2 - ;; ShengMu B - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 - ?\x0000 ?\x8000 ?\x0000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu C - ?\x828b ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x0000 ?\x0280 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 - ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu Ch - ?\x838b ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 - ?\x0000 ?\x0380 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x8000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu D - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x0000 ?\x8000 ?\x0000 - ?\x8000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 - ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu F - ?\x0000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu G - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x8000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu H - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x8000 ?\x0000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x8000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu J - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x8000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x08a4 ?\x0000 ?\x0000 - ?\x08a7 ?\x0000 ?\x08a5 ?\x0000 ?\x08a8 ?\x0000 ?\x889b ?\x88a0 ?\x8000 ?\x889e - ?\x88a2 - ;; ShengMu K - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x8000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu L - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x8000 - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 - ?\x8000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 - ?\x8000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu M - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x0000 ?\x8000 ?\x0000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 - ?\x8000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu N - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x0000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 - ?\x8000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 - ?\x8000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu P - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 - ?\x0000 ?\x8000 ?\x0000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu Q - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x8000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0ea4 ?\x0000 ?\x0000 - ?\x0ea7 ?\x0000 ?\x0ea5 ?\x0000 ?\x0ea8 ?\x0000 ?\x8e9b ?\x8ea0 ?\x8000 ?\x8e9e - ?\x8ea2 - ;; ShengMu R - ?\x8f8b ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 - ?\x0000 ?\x0f80 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 - ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu S - ?\x908b ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 - ?\x0000 ?\x1080 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 - ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu Sh - ?\x918b ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x0000 ?\x1180 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x8000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu T - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x8000 - ?\x0000 ?\x8000 ?\x0000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 - ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu W - ?\x939b ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 ?\x0000 ?\x1380 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu X - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x8000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x14a4 ?\x0000 ?\x0000 - ?\x14a7 ?\x0000 ?\x14a5 ?\x0000 ?\x14a8 ?\x0000 ?\x949b ?\x94a0 ?\x8000 ?\x949e - ?\x94a2 - ;; ShengMu Y - ?\x958b ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0090 ?\x0000 ?\x9591 ?\x9592 - ?\x0000 ?\x1580 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x1588 ?\x1589 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x0093 ?\x8000 ?\x00a4 ?\x0000 ?\x0000 - ?\x00a7 ?\x0000 ?\x00a5 ?\x0000 ?\x00a8 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu Z - ?\x968b ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x0000 ?\x1680 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 - ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ;; ShengMu Zh - ?\x978b ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x0000 ?\x1780 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 - ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 ?\x8000 - ?\x8000 ?\x8000 ?\x0000 ?\x8000 ?\x8000 ?\x8000 ?\x0000 ?\x0000 ?\x8000 ?\x0000 - ?\x0000 - ]) - -(defun encode-euc-cwnn-region (beg end) - "Encode the text in the current region to EUC-cWnn. -Return the length of resulting text." - (interactive "r") - (let (sylend s y z (enable-multibyte-characters t)) - (save-excursion - (save-restriction - (narrow-to-region beg end) - (goto-char (point-min)) - (while (< (point) (point-max)) - (cond - ((looking-at "[A-Za-z(0!(B-(0?(B]+(0@(B") - ;; PinYin - (setq sylend (match-end 0)) - (if (and (looking-at "[B-Z]h?") - (setq s (assoc (buffer-substring (match-beginning 0) (match-end 0)) - yincoding-pinyin-shengmu))) - (setq s (cdr s) y (buffer-substring (match-end 0) sylend)) - (setq s 0 y (buffer-substring (point) sylend))) - (if (and (setq y (assoc y yincoding-pinyin-yunmu)) - (= (aref yincoding-pinyin-table (+ (* 39 s) (nth 1 y))) 1)) - (progn - (delete-region (point) sylend) - (insert (char-to-string (+ (* 2 (nth 1 y)) 32 (if (nth 2 y) 1 0))) - (char-to-string (+ (* 4 (if (= s 0) 20 s)) 156 (if (nth 2 y) (nth 2 y) 0))))) - (encode-euc-cwnn-1-char))) - ((looking-at "[(0E(B-(0i(B@0-4]+[(0@ABCD(B]") - ;; ZhuYin - (setq sylend (match-end 0)) - (if (setq y (assoc (buffer-substring (point) sylend) yincoding-zhuyin-yunmu)) - (setq s 0) - (if (setq s (assoc (char-to-string (following-char)) yincoding-zhuyin-shengmu)) - (setq s (cdr s) y (buffer-substring (+ (point) yincoding-zhuyin-length) sylend)) - (setq s 0 y (buffer-substring (point) sylend))) - (setq y (assoc y yincoding-zhuyin-yunmu))) - (if (and y - (/= (logand (setq z (aref yincoding-zhuyin-table (+ (* 41 s) (nth 1 y)))) ?\x8000) 0)) - (progn - (delete-region (point) sylend) - (if (/= (logand z ?\x80) 0) - (setq s (logand (lsh z -8) 127) y (list nil (logand z 127) (nth 2 y)))) - (insert (+ (* 2 (nth 1 y)) 32 (if (nth 2 y) 1 0)) - (+ (* 4 (if (= s 0) 20 s)) 156 (if (nth 2 y) (nth 2 y) 0)))) - (encode-euc-cwnn-1-char))) - (t (encode-euc-cwnn-1-char)))) - (- (point-max) (point-min)))))) - -(defun encode-euc-cwnn-1-char () - (let ((enable-multibyte-characters nil)) - (cond - ((eq (following-char) (charset-id 'chinese-gb2312)) - (delete-char 1) - (forward-char 2)) - ((looking-at chinese-sisheng-leading-chars) - (delete-region (match-beginning 0) (match-end 0)) - (insert 0) - (forward-char)) - (t - (insert 0) - (forward-char))))) - -(defun pre-write-encode-euc-cwnn (from to) - (let ((buf (current-buffer)) - (work (get-buffer-create " *pre-write-encoding-work*"))) - (set-buffer work) - (erase-buffer) - (if (stringp from) - (insert from) - (insert-buffer-substring buf from to)) - (encode-euc-cwnn-region 1 (point-max)) - nil)) - -(defun decode-euc-cwnn-region (beg end) - "Decode EUC-cWnn encoded text in the current region. -Return the length of resulting text." - (interactive "r") - (prog1 - (let (c cc s y ss (enable-multibyte-characters nil)) - (save-restriction - (narrow-to-region beg end) - (goto-char (point-min)) - (while (< (point) (point-max)) - (setq c (following-char)) - (cond - ((eq c 0) - (delete-char 1) - (if (>= (following-char) 128) - (insert chinese-sisheng-leading-chars)) - (forward-char)) - ((>= c 128) - (insert (charset-id 'chinese-gb2312)) - (forward-char 2) - (if (< (setq c (preceding-char)) 128) - (progn - (delete-char -1) - (insert (+ c 128)) - (forward-char)))) - (t - (delete-char 1) - (setq cc (logand (following-char) 127)) - (delete-char 1) - (setq s (+ (lsh (- cc 32) -2) 1) - y (lsh (- c 32) -1) - ss (+ (logand c 1) (logand cc 3))) - (if cwnn-zhuyin - (progn - (setq c (aref yincoding-zhuyin-table (+ (* 41 s) y))) - (if (eq (logand c ?\x8080) ?\x80) - (setq s (lsh c -8) - y (logand c 127))) - (if (and (eq s 20) - (eq (aref yincoding-pinyin-table (+ (* 39 s) y)) 0)) - (setq s 0)) - (insert (car (nth s yincoding-zhuyin-shengmu)) - (car (nth (+ (* 5 y) ss) yincoding-zhuyin-yunmu)))) - (if (and (eq s 20) - (eq (aref yincoding-pinyin-table (+ (* 39 s) y)) 0)) - (setq s 0)) - (insert (car (nth s yincoding-pinyin-shengmu)) - (car (nth (+ (* 5 y) ss) yincoding-pinyin-yunmu))))))) - (- (point-max) (point-min)))) - (if (looking-at "\0\0") (forward-char 2)))) - -(defun post-read-decode-euc-cwnn (len) - (let ((pos (point)) - (buffer-modified-p (buffer-modified-p))) - (prog1 - (decode-euc-cwnn-region pos (+ pos len)) - (set-buffer-modified-p buffer-modified-p)))) - -(make-coding-system 'fixed-euc-cn 5 ?W "Coding System for fixed EUC Japanese") -(put 'fixed-euc-cn 'post-read-conversion 'post-read-decode-euc-cwnn) -(put 'fixed-euc-cn 'pre-write-conversion 'pre-write-encode-euc-cwnn) - -;;; euc-cn.el ends here. -- 1.7.10.4