From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Marc Wilhelm =?iso-8859-1?Q?K=FCster?= Newsgroups: gmane.emacs.bugs Subject: Re: UTF-8 related display problem Date: Thu, 10 Oct 2002 11:12:57 +0200 Sender: bug-gnu-emacs-admin@gnu.org Message-ID: <5.1.0.14.2.20021010110928.00add1f0@pop.puretec.de> References: <5.1.0.14.2.20021007210058.031a7818@pop.puretec.de> <5.1.0.14.2.20021007091714.03334510@pop.puretec.de> <5.1.0.14.2.20021007210058.031a7818@pop.puretec.de> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1"; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1034241514 11806 127.0.0.1 (10 Oct 2002 09:18:34 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 10 Oct 2002 09:18:34 +0000 (UTC) Cc: eliz@is.elta.co.il,bug-gnu-emacs@gnu.org 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 17zZSh-000343-00 for ; Thu, 10 Oct 2002 11:18:32 +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 17zZSN-0004WS-00; Thu, 10 Oct 2002 05:18:11 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17zZRa-0003mM-00 for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2002 05:17:22 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17zZRP-0003ea-00 for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2002 05:17:22 -0400 Original-Received: from moutvdom.kundenserver.de ([195.20.224.200]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17zZRO-0003eO-00 for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2002 05:17:10 -0400 Original-Received: from [195.20.224.206] (helo=mrvdomng.kundenserver.de) by moutvdom.kundenserver.de with esmtp (Exim 3.35 #1) id 17zZOE-000692-00; Thu, 10 Oct 2002 11:13:54 +0200 Original-Received: from [80.152.6.90] (helo=laptop1.saphor.net) by mrvdomng.kundenserver.de with esmtp (Exim 3.35 #1) id 17zZOD-0005J8-00; Thu, 10 Oct 2002 11:13:54 +0200 X-Sender: pt7571697-0704@pop.puretec.de X-Mailer: QUALCOMM Windows Eudora Version 5.1 Original-To: Kenichi Handa In-Reply-To: <200210080109.KAA16152@etlken.m17n.org> 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:3675 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:3675 >In article <5.1.0.14.2.20021007210058.031a7818@pop.puretec.de>, Marc=20 >Wilhelm K=FCster writes: > > Please find attached a version of the file that has all ASCII letters=20 > (a-z, > > A-Z) transformed into a's. All non-ASCII letters are left intact. The= bug > > still occurs. > > > Just open the file as a UTF-8 text file. Note that the display ends= right > > in a Hebrew passage on line 2883 (the line begins with > >I found a bug that is revealed typically by decoding large >utf-8-dos file (your case). > >I've just installed the attached fix in HEAD and RC. Could >you please try it? Thanks a lot! That is fabulous. I downloaded the head and tried it out=20 (took me a bit of time because I didn't notice INSTALL-CVS at first...).=20 The file now displays as it should. Best regards, Marc K=FCster >--- >Ken'ichi HANDA >handa@m17n.org > >2002-10-08 Kenichi Handa > > * coding.c (code_convert_region): When we need more GAP for > conversion, pay attention to the case that coding->produced is not > greater than coding->consumed. > >Index: coding.c >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >RCS file: /cvs/emacs/src/coding.c,v >retrieving revision 1.259 >retrieving revision 1.260 >diff -u -c -r1.259 -r1.260 >cvs server: conflicting specifications of output style >*** coding.c 30 Sep 2002 06:28:31 -0000 1.259 >--- coding.c 8 Oct 2002 00:57:59 -0000 1.260 >*************** >*** 5696,5704 **** > REQUIRE + LEN_BYTE =3D LEN_BYTE * (NEW / ORIG) > REQUIRE =3D LEN_BYTE * (NEW - ORIG) / ORIG > Here, we are sure that NEW >=3D ORIG. */ >! float ratio =3D coding->produced - coding->consumed; >! ratio /=3D coding->consumed; >! require =3D len_byte * ratio; > first =3D 0; > } > if ((src - dst) < (require + 2000)) >--- 5696,5714 ---- > REQUIRE + LEN_BYTE =3D LEN_BYTE * (NEW / ORIG) > REQUIRE =3D LEN_BYTE * (NEW - ORIG) / ORIG > Here, we are sure that NEW >=3D ORIG. */ >! float ratio; >! >! if (coding->produced <=3D coding->consumed) >! { >! /* This happens because of CCL-based coding system with >! eol-type CRLF. */ >! require =3D 0; >! } >! else >! { >! ratio =3D (coding->produced - coding->consumed) /=20 >coding->consumed; >! require =3D len_byte * ratio; >! } > first =3D 0; > } > if ((src - dst) < (require + 2000)) ************************* Marc Wilhelm K=FCster Saphor GmbH Fronl=E4nder 22 D-72072 T=FCbingen Tel.: (+49) / (0)7472 / 949 100 Fax: (+49) / (0)7472 / 949 114