From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Thomas Morgan Newsgroups: gmane.emacs.bugs Subject: decode-char & utf-8-fragment-on-decoding Date: 04 Sep 2002 01:56:15 -0400 Sender: bug-gnu-emacs-admin@gnu.org Message-ID: <87y9aii9hc.fsf@cricket.magic.csuhayward.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1031119229 8977 127.0.0.1 (4 Sep 2002 06:00:29 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 4 Sep 2002 06:00:29 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17mTDH-0002Kf-00 for ; Wed, 04 Sep 2002 08:00:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17mTEs-0007g0-00; Wed, 04 Sep 2002 02:02:06 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17mTEh-0007ff-00 for bug-gnu-emacs@gnu.org; Wed, 04 Sep 2002 02:01:55 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17mTEe-0007fS-00 for bug-gnu-emacs@gnu.org; Wed, 04 Sep 2002 02:01:55 -0400 Original-Received: from gull.mail.pas.earthlink.net ([207.217.120.84]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17mTEe-0007fO-00 for bug-gnu-emacs@gnu.org; Wed, 04 Sep 2002 02:01:52 -0400 Original-Received: from user-2iveauc.dialup.mindspring.com ([165.247.43.204] helo=cricket.magic.csuhayward.edu) by gull.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 17mTEb-0001ms-00 for bug-gnu-emacs@gnu.org; Tue, 03 Sep 2002 23:01:49 -0700 Original-To: bug-gnu-emacs@gnu.org Original-Lines: 40 Errors-To: bug-gnu-emacs-admin@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.bugs:3403 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:3403 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 ?=CE=93)) (=3D 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))))) =20=20 --- 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))))) =20=20 Diff finished at Wed Sep 4 01:31:04