jed-users mailing list

[2006 Date Index] [2006 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: UTF-8 problems


Jörg Sommer spake unto us the following wisdom:
> > 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.

As I mentioned in another message in this thread, I had the same error
on an ubuntu system with the Ubuntu slang, but a stock Slang (even the
same version as shipped by Ubuntu, but without their patches) did not
display this problem.  You might look at Debian's patches to Slang to
see if it's their fault...

Ethan

-- 
The laws that forbid the carrying of arms are laws [that have no remedy
for evils].  They disarm only those who are neither inclined nor
determined to commit crimes.
		-- Cesare Beccaria, "On Crimes and Punishments", 1764

Attachment: signature.asc
Description: Digital signature


[2006 date index] [2006 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]