[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
decode-char & utf-8-fragment-on-decoding
From: |
Thomas Morgan |
Subject: |
decode-char & utf-8-fragment-on-decoding |
Date: |
04 Sep 2002 01:56:15 -0400 |
decode-char does not honor utf-8-fragment-on-decoding.
I tried this code in
GNU Emacs 21.3.50.2 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
of 2002-09-03 on cricket
run with options -q and --no-site-file.
(let ((utf-8-fragment-on-decoding nil)
(c ?Γ))
(= c (decode-char 'ucs (encode-char c 'ucs))))
encode-char returns 915, decode-char returns 2883, and the entire sexp
evalutes nil. The Unicode code point is translated into greek-iso8859-7
by decode-char even though utf-8-fragment-on-decoding is not enabled.
Is this a bug? The following change makes decode-char act as I expected.
*** /src/emacs/lisp/international/mule.el.~1.159.~ Sat Aug 24 03:46:25 2002
--- /src/emacs/lisp/international/mule.el Wed Sep 4 01:30:54 2002
***************
*** 331,337 ****
(setq code-point (- code-point #xe000))
(make-char 'mule-unicode-e000-ffff
(+ (/ code-point 96) 32) (+ (% code-point 96) 32))))))
! (if (and c (aref utf-8-translation-table-for-decode c))
(aref utf-8-translation-table-for-decode c)
c)))))
--- 331,339 ----
(setq code-point (- code-point #xe000))
(make-char 'mule-unicode-e000-ffff
(+ (/ code-point 96) 32) (+ (% code-point 96) 32))))))
! (if (and c
! utf-8-fragment-on-decoding
! (aref utf-8-translation-table-for-decode c))
(aref utf-8-translation-table-for-decode c)
c)))))
Diff finished at Wed Sep 4 01:31:04
- decode-char & utf-8-fragment-on-decoding,
Thomas Morgan <=
- Re: decode-char & utf-8-fragment-on-decoding, Kenichi Handa, 2002/09/04
- Re: decode-char & utf-8-fragment-on-decoding, Dave Love, 2002/09/04
- Re: decode-char & utf-8-fragment-on-decoding, Thomas Morgan, 2002/09/05
- Re: decode-char & utf-8-fragment-on-decoding, Dave Love, 2002/09/05
- Re: decode-char & utf-8-fragment-on-decoding, Thomas Morgan, 2002/09/05
- Re: decode-char & utf-8-fragment-on-decoding, Dave Love, 2002/09/07
- Re: decode-char & utf-8-fragment-on-decoding, Thomas Morgan, 2002/09/07
- Re: decode-char & utf-8-fragment-on-decoding, Dave Love, 2002/09/09