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

Re: Correct use of UTF-8 under Unix



  PILCH Hartmut <phm@a2e.de> writes:

> Thanks to Otfried Cheong's conversion frontend, I am currently using
> Emacs with the "unicode-utf8" encoding (is that a MIME name?),

The MIME name is, of course, `utf-8'. I've changed Otfried Cheong's
code in the following way to accommodate that:

--- unicode.el	Thu Oct  7 18:42:06 1999
+++ /home/fw/emacs/unicode.el	Sat Oct 30 13:46:35 1999
@@ -24,7 +24,7 @@
 (defvar utf8-conversion-program "utf2mule")
 
 (make-coding-system
- 'unicode-utf8 0 ?U
+ 'utf-8 0 ?U
  "Unicode UTF-8 encoding"
  nil
  '((safe-charsets . t)
@@ -72,14 +72,17 @@
 
 (define-charset nil 'korean-johab
   [2 96 2 0 ?= 0 "Johab" "Johab" "Johab Hangul elements"])
+(put-charset-property 'korean-johab 'preferred-coding-system 'utf-8)
 
 (define-charset nil 'unicode-mono
   [2 96 1 0 ?< 0 "Unicode Mono" "Unicode Mono" 
      "Unicode 0100-0dff,1000-10ff,13a0-18ff,1e00-28ff,fb00-ffff"])
+(put-charset-property 'unicode-mono 'preferred-coding-system 'utf-8)
 
 (define-charset 151 'unicode-wide
   [2 96 2 0 ?> 0 "Unicode Wide" "Unicode Wide" 
      "Unicode 02e80-33ff, 4e00-9fa6 (characters not in JIS,KSC,GB,Big5)"])
+(put-charset-property 'unicode-wide 'preferred-coding-system 'utf-8)
 
 ;; Tell C code charset ID's of several charsets.
 (setup-special-charsets)
@@ -145,7 +148,7 @@
 	    (cons (cons "iso10646" ccl-encode-unicode-font)
 		  font-ccl-encoder-alist)))
   
-(modify-coding-system-alist 'file "\\.utf\\'" 'unicode-utf8)
+(modify-coding-system-alist 'file "\\.utf\\'" 'utf-8)
 
 (setq x-pixel-size-width-font-regexp
       "gb2312\\|jisx0208\\|ksc5601\\|cns11643\\|big5\\|johab")

-
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/lists/