/[emacs]/emacs/lisp/international/utf-8-subst.el
ViewVC logotype

Diff of /emacs/lisp/international/utf-8-subst.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by rms, Sun May 19 01:37:55 2002 UTC revision 1.5 by fx, Wed Jul 17 10:36:16 2002 UTC
# Line 1  Line 1 
1  ;;; utf-8-subst.el --- translation of untranslatable utf-8 to CJK -*-coding: iso-2022-7bit;-*-  ;;; utf-8-subst.el --- translation of untranslatable utf-8 to CJK -*-coding: iso-2022-7bit;-*-
2    
3  ;; Copyright (C) 2001  Free Software Foundation, Inc.  ;; Copyright (C) 2001, 2002  Free Software Foundation, Inc.
4    
5  ;; Author: Dave Love <fx@gnu.org>  ;; Author: Dave Love <fx@gnu.org>
6  ;; Keywords: i18n  ;; Keywords: i18n
# Line 24  Line 24 
24    
25  ;;; Commentary:  ;;; Commentary:
26    
27  ;; Defines hash table `utf-8-subst-table' which maps UTF-8  ;; Defines hash table `utf-8-subst-table' which maps UTF-8 otherwise
28  ;; `untranslatable' characters to characters in specific Emacs CJK  ;; `untranslatable' characters to characters in specific Emacs CJK
29  ;; charsets.  Values in the table can be used as the composition of  ;; charsets.  The CJK charsets used are chinese-gb2312,
30  ;; such sequences for a more useful result.  The CJK charsets used are  ;; japanese-jisx0208 and korean-ksc5601.  Where their Unicodes
31  ;; chinese-gb2312, japanese-jisx0208 and korean-ksc5601.  Where their  ;; overlap, the priority used is J C K, guessing the likelihood of
32  ;; Unicodes overlap, the priority used is J C K, guessing the  ;; fonts being available generally.  This can be altered by changing
33  ;; likelihood of fonts being available generally.  This can be altered  ;; the order in which the table is filled.  This should doubtless be
34  ;; by changing the order in which the table is filled.  This should  ;; cusomizable somehow.
 ;; doubtless be cusomizable somehow.  
35    
36  ;;; Code:  ;;; Code:
37    
 (eval-when-compile (defvar utf-8-subst-table))  
   
 (unless utf-8-subst-table  
   (setq utf-8-subst-table (make-hash-table :test 'eq :size 22000)))  
   
38  ;; korean-ksc5601  ;; korean-ksc5601
39  (mapc  (mapc
40   (lambda (pair)   (lambda (pair)
41     (puthash (car pair) (cadr pair) utf-8-subst-table))     (puthash (car pair) (cadr pair) utf-8-subst-table)
42       (puthash (cadr pair) (car pair) utf-8-subst-rev-table))
43   '((#x4E00 ?$(Cli(B)   '((#x4E00 ?$(Cli(B)
44     (#x4E01 ?$(CoK(B)     (#x4E01 ?$(CoK(B)
45     (#x4E03 ?$(CvR(B)     (#x4E03 ?$(CvR(B)
# Line 7019  Line 7014 
7014  ;; chinese-gb2312  ;; chinese-gb2312
7015  (mapc  (mapc
7016   (lambda (pair)   (lambda (pair)
7017     (puthash (car pair) (cadr pair) utf-8-subst-table))     (puthash (car pair) (cadr pair) utf-8-subst-table)
7018       (puthash (cadr pair) (car pair) utf-8-subst-rev-table))
7019   '((#x4E00 ?$AR;(B)   '((#x4E00 ?$AR;(B)
7020     (#x4E01 ?$A6!(B)     (#x4E01 ?$A6!(B)
7021     (#x4E03 ?$AF_(B)     (#x4E03 ?$AF_(B)
# Line 13788  Line 13784 
13784  ;; japanese-jisx0208  ;; japanese-jisx0208
13785  (mapc  (mapc
13786   (lambda (pair)   (lambda (pair)
13787     (puthash (car pair) (cadr pair) utf-8-subst-table))     (puthash (car pair) (cadr pair) utf-8-subst-table)
13788       (puthash (cadr pair) (car pair) utf-8-subst-rev-table))
13789   '((#x4E00 ?$B0l(B)   '((#x4E00 ?$B0l(B)
13790     (#x4E01 ?$BCz(B)     (#x4E01 ?$BCz(B)
13791     (#x4E03 ?$B<7(B)     (#x4E03 ?$B<7(B)

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26