- Subject: Re: UTF-8 problems
- From: Jörg Sommer <joerg@xxxxxxxxxxxx>
- Date: Sat, 27 May 2006 13:08:04 +0000 (UTC)
Hallo John,
"John E. Davis" <davis@xxxxxxxxxxxxx> wrote:
> Jörg Sommer <joerg@xxxxxxxxxxxx> wrote:
>>% xjed --version
>>jed version: 0.99.19-8/Unix
>> Compiled with GNU C 4.0
>>S-Lang version: 2.0.6
>
> How stable is GNU C 4.0?
Good. It's Debian default compiler, but it has some bugs on other
architectures. Therefor Debian will switch to gcc 4.1 in the next months
> If you have not already done so, please try recompiling with CFLAGS=-g.
I found the following: Pressing the right key at the begin of this
character sequence, jed reaches anywhere the point
cmds.c:next_char_cmd() and evaluates next_visible_chars(1). This
returns 4 with is != 1 in line cmds.c:661 and the error is triggered by
the function eob_bob_error(2), which explains why the cursor is at the
end of buffer after the error.
Next round: next_visible_chars(1) calls buffer.c:jed_right(1). This call
through jed_multibyte_chars_forward() SLutf8_skip_chars(p, pmax, 1, &dn,
1). This returns in dn the value 2 (UTF-8 character) which causes
jed_right() calculates n -= dn (=1-2 =-1) and checks for n == 0. This is
not valid and jed_right run the next loop with SLutf8_skip_chars(p, pmax,
-1, &dn, 1) (regard the -1 in the third parameter). IMO the error is in
SLutf8_skip_chars() which should return the number of skipped UTF-8
characters.
> FWIW, I use gcc version 3.3.5.
GCC 4.0 and 4.1 (more than 4.0) are stricter in checking code. Many
projects fail, but I've jed compiles with 4.1.
Schöne Grüße, Jörg.
--
Dein Gesicht wird dir geschenkt. Lächeln musst du selber! (Inga Hermann)
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2006 date index]
[2006 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]