/[emacs]/emacs/lisp/international/codepages.el
ViewVC logotype

Diff of /emacs/lisp/international/codepages.el

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

revision 1.1.2.3 by fx, Mon Sep 10 17:12:46 2001 UTC revision 1.1.2.4 by fx, Tue Nov 20 16:53:44 2001 UTC
# Line 22  Line 22 
22    
23  ;;; Commentary:  ;;; Commentary:
24    
25    ;; [NB.  This file should only be used with Emacs 21 because it
26    ;; depends on the `safe-chars' coding-system property.  It was
27    ;; intended to be used with a somewhat-modified version of
28    ;; mule-diag.el.]
29    
30  ;; Definitions of miscellaneous 8-bit coding systems based on ASCII  ;; Definitions of miscellaneous 8-bit coding systems based on ASCII
31  ;; (we can't cope with EBCDIC, for instance), mainly for PC `code  ;; (we can't cope with EBCDIC, for instance), mainly for PC `code
32  ;; pages'.  They are decoded into Latin-1 and mule-unicode charsets  ;; pages'.  They are decoded into Latin-1 and mule-unicode charsets
# Line 44  Line 49 
49  ;; few CPs from codepage.el (770, 773, 774) aren't covered (in the  ;; few CPs from codepage.el (770, 773, 774) aren't covered (in the
50  ;; absence of translation tables to Unicode).  ;; absence of translation tables to Unicode).
51    
52  ;; Compile this to avoid loading `ccl' at runtime.  ;; Compile this, to avoid loading `ccl' at runtime.
53    
54    ;; Although the tables used here aren't very big, it might be worth
55    ;; splitting the file and autoloading the coding systems if/when my
56    ;; (or similar) autoloading code is installed.
57    
58  ;;; Code:  ;;; Code:
59    
# Line 142  characters used by the IBM codepages, ty Line 151  characters used by the IBM codepages, ty
151  read/written by MS-DOS software, or for display on the MS-DOS terminal."  read/written by MS-DOS software, or for display on the MS-DOS terminal."
152    (interactive    (interactive
153     (let ((completion-ignore-case t)     (let ((completion-ignore-case t)
154            (candidates (cp-supported-codepages)))           (candidates (cp-supported-codepages)))
155       (list (completing-read "Setup DOS Codepage: (default 437) " candidates       (list (completing-read "Setup DOS Codepage: (default 437) " candidates
156                                  nil t nil nil "437"))))                              nil t nil nil "437"))))
157    (let ((cp (format "cp%s" codepage)))    (let ((cp (format "cp%s" codepage)))
158      (unless (coding-system-p (intern cp))      (unless (coding-system-p (intern cp))
159        (cp-make-coding-systems-for-codepage        (cp-make-coding-systems-for-codepage
160         cp (cp-charset-for-codepage cp) (cp-offset-for-codepage cp))))))         cp (cp-charset-for-codepage cp) (cp-offset-for-codepage cp)))))))
   )  
161    
162  ;; Somewhat ammended from the version in mule-diag.el, needed below.  ;; Somewhat ammended from the version in mule-diag.el, needed below.
163  (defvar non-iso-charset-alist  (defvar non-iso-charset-alist
# Line 206  of the first byte, and the cdr part is t Line 214  of the first byte, and the cdr part is t
214  V is a 128-long vector of characters to translate the upper half of  V is a 128-long vector of characters to translate the upper half of
215  the charactert set.  DOC-STRING and MNEMONIC are used as the  the charactert set.  DOC-STRING and MNEMONIC are used as the
216  corresponding args of `make-coding-system'.  If MNEMONIC isn't given,  corresponding args of `make-coding-system'.  If MNEMONIC isn't given,
217  ?D is used."  ?* is used."
218    (let* ((encoder (intern (format "encode-%s" name)))    (let* ((encoder (intern (format "encode-%s" name)))
219           (decoder (intern (format "decode-%s" name)))           (decoder (intern (format "decode-%s" name)))
220           (ccl-decoder           (ccl-decoder
# Line 236  corresponding args of `make-coding-syste Line 244  corresponding args of `make-coding-syste
244           (char-table-extra-slot translation-table 0))           (char-table-extra-slot translation-table 0))
245         (cp-fix-safe-chars ',name)         (cp-fix-safe-chars ',name)
246         (make-coding-system         (make-coding-system
247          ',name 4 ,(or mnemonic ?D)          ',name 4 ,(or mnemonic ?*)
248          (or ,doc-string (format "%s encoding" ',name))          (or ,doc-string (format "%s encoding" ',name))
249          (cons ,ccl-decoder ,ccl-encoder)          (cons ,ccl-decoder ,ccl-encoder)
250          (list (cons 'safe-chars (get ',encoder 'translation-table))          (list (cons 'safe-chars (get ',encoder 'translation-table))
# Line 2230  corresponding args of `make-coding-syste Line 2238  corresponding args of `make-coding-syste
2238    ?\¤    ?\¤
2239    ?\■    ?\■
2240    ?\ ]    ?\ ]
2241   "CP866 (Cyrillic Alternativnyj) encoding using Unicode.")   "CP866 (Cyrillic Alternativnyj) encoding using Unicode."
2242     ?A)
2243  (define-coding-system-alias 'alternativnyj 'cp866)  (define-coding-system-alias 'alternativnyj 'cp866)
2244  (cp-fix-safe-chars 'cyrillic-alternativnyj)  (cp-fix-safe-chars 'cyrillic-alternativnyj)
2245  (define-coding-system-alias 'cyrillic-alternativnyj 'cp866)  (define-coding-system-alias 'cyrillic-alternativnyj 'cp866)
# Line 2626  corresponding args of `make-coding-syste Line 2635  corresponding args of `make-coding-syste
2635    ?\ü    ?\ü
2636    ?\ý    ?\ý
2637    ?\ţ    ?\ţ
2638    ?\˙]    ?\˙])
  "CP1250/Windows-1250 Encoding")  
2639    
2640  ;; be_BY, bg_BG  ;; be_BY, bg_BG
2641  (cp-make-coding-system  (cp-make-coding-system
# Line 2760  corresponding args of `make-coding-syste Line 2768  corresponding args of `make-coding-syste
2768    ?\э    ?\э
2769    ?\ю    ?\ю
2770    ?\я]    ?\я]
2771   "CP1251/Windows-1251 Encoding")   nil ?b)
2772    
2773  (cp-make-coding-system  (cp-make-coding-system
2774   windows-1252   windows-1252
# Line 2891  corresponding args of `make-coding-syste Line 2899  corresponding args of `make-coding-syste
2899    ?\ü    ?\ü
2900    ?\ý    ?\ý
2901    ?\þ    ?\þ
2902    ?\ÿ]    ?\ÿ])
  "CP1252/Windows-1252 (Western) Encoding")  
2903    
2904  (cp-make-coding-system  (cp-make-coding-system
2905   windows-1253   windows-1253
# Line 3024  corresponding args of `make-coding-syste Line 3031  corresponding args of `make-coding-syste
3031    ?\ύ    ?\ύ
3032    ?\ώ    ?\ώ
3033    nil]    nil]
3034   "CP1253/Windows-1253 Encoding")   nil ?g) ;; Greek
3035    
3036  (cp-make-coding-system  (cp-make-coding-system
3037   windows-1254   windows-1254
# Line 3155  corresponding args of `make-coding-syste Line 3162  corresponding args of `make-coding-syste
3162    ?\ü    ?\ü
3163    ?\ı    ?\ı
3164    ?\ş    ?\ş
3165    ?\ÿ]    ?\ÿ])
 "CP1254/Windows-1254 Encoding")  
3166    
3167  ;; yi_US  ;; yi_US
3168  (cp-make-coding-system  (cp-make-coding-system
# Line 3289  corresponding args of `make-coding-syste Line 3295  corresponding args of `make-coding-syste
3295    ?\‎    ?\‎
3296    ?\‏    ?\‏
3297    nil]    nil]
3298   "CP1255/Windows-1255 Encoding")   nil ?h) ;; Hebrew
3299    
3300  (cp-make-coding-system  (cp-make-coding-system
3301   windows-1256   windows-1256
# Line 3421  corresponding args of `make-coding-syste Line 3427  corresponding args of `make-coding-syste
3427    ?\‎    ?\‎
3428    ?\‏    ?\‏
3429    ?\ÿ]    ?\ÿ]
3430   "CP1256/Windows-1256 Encoding")   nil ?a) ;; Arabic
3431    
3432  (cp-make-coding-system  (cp-make-coding-system
3433   windows-1257   windows-1257
# Line 3552  corresponding args of `make-coding-syste Line 3558  corresponding args of `make-coding-syste
3558    ?\ü    ?\ü
3559    ?\ż    ?\ż
3560    ?\ž    ?\ž
3561    nil]    nil])
  "CP1257/Windows-1257 Encoding")  
3562    
3563  (cp-make-coding-system  (cp-make-coding-system
3564   windows-1258   windows-1258
# Line 3684  corresponding args of `make-coding-syste Line 3689  corresponding args of `make-coding-syste
3689    ?\ü    ?\ü
3690    ?\ư    ?\ư
3691    ?\₫    ?\₫
3692    ?\ÿ]    ?\ÿ])
  "CP1258/Windows-1258 Encoding")  
3693    
3694  (cp-make-coding-system  (cp-make-coding-system
3695   next   next
# Line 4351  corresponding args of `make-coding-syste Line 4355  corresponding args of `make-coding-syste
4355    ?\ę    ?\ę
4356    ?\ț    ?\ț
4357    ?\ÿ]    ?\ÿ]
4358   "Unicode-based encoding for Latin-10 (MIME: ISO-8859-16)")   "Unicode-based encoding for Latin-10 (MIME: ISO-8859-16)"
4359     ?r) ;; Romanian
4360  (coding-system-put 'iso-latin-10 'mime-charset 'iso-8859-16)  (coding-system-put 'iso-latin-10 'mime-charset 'iso-8859-16)
4361  (define-coding-system-alias 'iso-8859-16 'iso-latin-10)  (define-coding-system-alias 'iso-8859-16 'iso-latin-10)
4362  (define-coding-system-alias 'latin-10 'iso-latin-10)  (define-coding-system-alias 'latin-10 'iso-latin-10)
4363    
4364    ;; Unicode-based alternative which has the possible advantage of
4365    ;; having its relative sparseness specified.
4366  (cp-make-coding-system  (cp-make-coding-system
4367   ;; The base system uses arabic-iso-8bit, but that's not a MIME charset.   ;; The base system uses arabic-iso-8bit, but that's not a MIME charset.
4368   iso-8859-6   iso-8859-6
# Line 4415  corresponding args of `make-coding-syste Line 4422  corresponding args of `make-coding-syste
4422    nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil    nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
4423    nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil    nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
4424    nil nil nil nil nil nil nil nil nil nil nil]    nil nil nil nil nil nil nil nil nil nil nil]
4425   "Arabic ISO/IEC 8859-6 (MIME: ISO-8859-6) using Unicode"   "Unicode-based Arabic ISO/IEC 8859-6 (MIME: ISO-8859-6)"
4426   ?6)   ?6)
4427  (define-coding-system-alias 'arabic-iso-8bit 'iso-8859-6)  (define-coding-system-alias 'arabic-iso-8bit 'iso-8859-6)
4428    
# Line 4530  corresponding args of `make-coding-syste Line 4537  corresponding args of `make-coding-syste
4537   [nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil   [nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
4538    nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil    nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
4539    ?\     ?\ 
4540    ?\Ą    ?\¡
4541    ?\Ē    ?\¢
4542    ?\Ģ    ?\£
4543    ?\Ī    ?\¤
4544    ?\Ĩ    ?\„
4545    ?\Ķ    ?\¦
4546    ?\§    ?\§
4547    ?\Ļ    ?\¨
4548    ?\Đ    ?\©
4549    ?\Š    ?\ª
4550    ?\Ŧ    ?\«
4551    ?\Ž    ?\¬
4552    ?\­    ?\­
4553    ?\Ū    ?\®
4554    ?\Ŋ    ?\¯
4555    ?\°    ?\°
4556    ?\ą    ?\±
4557    ?\ē    ?\²
4558    ?\ģ    ?\³
4559    ?\ī    ?\“
4560    ?\ĩ    ?\µ
4561    ?\ķ    ?\¶
4562    ?\·    ?\·
4563    ?\ļ    ?\¸
4564    ?\đ    ?\¹
4565    ?\š    ?\º
4566    ?\ŧ    ?\»
4567    ?\ž    ?\¼
4568    ?\―    ?\½
4569    ?\ū    ?\¾
4570    ?\ŋ    ?\¿
4571      ?\Ą
4572      ?\Į
4573    ?\Ā    ?\Ā
4574    ?\Á    ?\Ć
   ?\Â  
   ?\Ã  
4575    ?\Ä    ?\Ä
4576    ?\Å    ?\Å
4577    ?\Æ    ?\Ę
4578    ?\Į    ?\Ē
4579    ?\Č    ?\Č
4580    ?\É    ?\É
4581    ?\Ę    ?\Ź
   ?\Ë  
4582    ?\Ė    ?\Ė
4583    ?\Í    ?\Ģ
4584    ?\Î    ?\Ķ
4585    ?\Ï    ?\Ī
4586    ?\Ð    ?\Ļ
4587      ?\Š
4588      ?\Ń
4589    ?\Ņ    ?\Ņ
   ?\Ō  
4590    ?\Ó    ?\Ó
4591    ?\Ô    ?\Ō
4592    ?\Õ    ?\Õ
4593    ?\Ö    ?\Ö
4594    ?\Ũ    ?\×
   ?\Ø  
4595    ?\Ų    ?\Ų
4596    ?\Ú    ?\Ł
4597    ?\Û    ?\Ś
4598      ?\Ū
4599    ?\Ü    ?\Ü
4600    ?\Ý    ?\Ż
4601    ?\Þ    ?\Ž
4602    ?\ß    ?\ß
4603      ?\ą
4604      ?\į
4605    ?\ā    ?\ā
4606    ?\á    ?\ć
   ?\â  
   ?\ã  
4607    ?\ä    ?\ä
4608    ?\å    ?\å
4609    ?\æ    ?\ę
4610    ?\į    ?\ē
4611    ?\č    ?\č
4612    ?\é    ?\é
4613    ?\ę    ?\ź
   ?\ë  
4614    ?\ė    ?\ė
4615    ?\í    ?\ģ
4616    ?\î    ?\ķ
4617    ?\ï    ?\ī
4618    ?\ð    ?\ļ
4619      ?\š
4620      ?\ń
4621    ?\ņ    ?\ņ
   ?\ō  
4622    ?\ó    ?\ó
4623    ?\ô    ?\ō
4624    ?\õ    ?\õ
4625    ?\ö    ?\ö
4626    ?\ũ    ?\÷
   ?\ø  
4627    ?\ų    ?\ų
4628    ?\ú    ?\ł
4629    ?\û    ?\ś
4630      ?\ū
4631    ?\ü    ?\ü
4632    ?\ý    ?\ż
4633    ?\þ    ?\ž
4634    ?\ĸ]    ?\’
4635   "Unicode-based encoding for Latin-7 (MIME: ISO-8859-13)")    ]
4636     "Unicode-based encoding for Latin-7 (MIME: ISO-8859-13)"
4637     ?l) ;; Lithuanian/Latvian
4638  (coding-system-put 'iso-latin-7 'mime-charset 'iso-8859-13)  (coding-system-put 'iso-latin-7 'mime-charset 'iso-8859-13)
4639  (define-coding-system-alias 'iso-8859-13 'iso-latin-7)  (define-coding-system-alias 'iso-8859-13 'iso-latin-7)
4640  (define-coding-system-alias 'latin-7 'iso-latin-7)  (define-coding-system-alias 'latin-7 'iso-latin-7)
# Line 4760  corresponding args of `make-coding-syste Line 4769  corresponding args of `make-coding-syste
4769    ?\ý    ?\ý
4770    ?\þ    ?\þ
4771    ?\ÿ]    ?\ÿ]
4772   "Unicode-based encoding for georgian-ps")   nil ?G)
4773  (coding-system-put 'georgian-ps 'mime-charset nil) ; not in IANA list  (coding-system-put 'georgian-ps 'mime-charset nil) ; not in IANA list
4774    
4775  ;; From http://www.microsoft.com/globaldev/reference/oem/720.htm  ;; From http://www.microsoft.com/globaldev/reference/oem/720.htm
4776  (cp-make-coding-system  (cp-make-coding-system
4777   cp720   cp720
4778   [?\é   [nil
4779      nil
4780      ?\é
4781    ?\â    ?\â
4782      nil
4783    ?\à    ?\à
4784      nil
4785    ?\ç    ?\ç
4786    ?\ê    ?\ê
4787    ?\ë    ?\ë
4788    ?\è    ?\è
4789    ?\ï    ?\ï
4790    ?\î    ?\î
4791      nil
4792      nil
4793      nil
4794      nil
4795    ?\ّ    ?\ّ
4796    ?\ْ    ?\ْ
4797    ?\ô    ?\ô

Legend:
Removed from v.1.1.2.3  
changed lines
  Added in v.1.1.2.4

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