From: Thomas Morgan <tlm@pocketmail.com>
Subject: decode-char & utf-8-fragment-on-decoding
Date: 04 Sep 2002 01:56:15 -0400 [thread overview]
Message-ID: <87y9aii9hc.fsf@cricket.magic.csuhayward.edu> (raw)
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
next reply other threads:[~2002-09-04 5:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-04 5:56 Thomas Morgan [this message]
2002-09-04 8:18 ` decode-char & utf-8-fragment-on-decoding Kenichi Handa
2002-09-04 23:34 ` Dave Love
2002-09-05 1:25 ` Kenichi Handa
2002-09-05 22:45 ` Dave Love
2002-09-05 5:23 ` Thomas Morgan
2002-09-05 22:47 ` Dave Love
2002-09-06 1:13 ` Thomas Morgan
2002-09-07 23:14 ` Dave Love
2002-09-08 1:07 ` Thomas Morgan
2002-09-09 22:35 ` Dave Love
-- strict thread matches above, loose matches on Subject: below --
2002-09-05 17:39 Thomas Morgan
2002-09-05 22:50 ` Dave Love
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y9aii9hc.fsf@cricket.magic.csuhayward.edu \
--to=tlm@pocketmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).