bug-gnu-emacs
[Top][All Lists]
Advanced

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

Re: UTF-8 related display problem


From: Marc Wilhelm Küster
Subject: Re: UTF-8 related display problem
Date: Thu, 10 Oct 2002 11:12:57 +0200


In article <address@hidden>, Marc Wilhelm Küster <address@hidden> writes: > Please find attached a version of the file that has all ASCII letters (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 <a><?aaaa 
address@hidden>

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 (took me a bit of time because I didn't notice INSTALL-CVS at first...). The file now displays as it should.

Best regards,

Marc Küster


---
Ken'ichi HANDA
address@hidden

2002-10-08  Kenichi Handa  <address@hidden>

        * 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
===================================================================
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 = LEN_BYTE * (NEW / ORIG)
                REQUIRE = LEN_BYTE * (NEW - ORIG) / ORIG
             Here, we are sure that NEW >= ORIG.  */
!         float ratio = coding->produced - coding->consumed;
!         ratio /= coding->consumed;
!         require = len_byte * ratio;
          first = 0;
        }
        if ((src - dst) < (require + 2000))
--- 5696,5714 ----
                REQUIRE + LEN_BYTE = LEN_BYTE * (NEW / ORIG)
                REQUIRE = LEN_BYTE * (NEW - ORIG) / ORIG
             Here, we are sure that NEW >= ORIG.  */
!         float ratio;
!
!         if (coding->produced <= coding->consumed)
!           {
!             /* This happens because of CCL-based coding system with
!               eol-type CRLF.  */
!             require = 0;
!           }
!         else
!           {
! ratio = (coding->produced - coding->consumed) / coding->consumed;
!             require = len_byte * ratio;
!           }
          first = 0;
        }
        if ((src - dst) < (require + 2000))

*************************
Marc Wilhelm Küster
Saphor GmbH

Fronländer 22
D-72072 Tübingen

Tel.: (+49) / (0)7472 / 949 100
Fax: (+49) / (0)7472 / 949 114





reply via email to

[Prev in Thread] Current Thread [Next in Thread]