On Mon, Sep 22, 2008 at 03:06:46PM +0200, Gerfried Fuchs wrote:
> Package: pal
> Version: 0.4.3-2
> Severity: normal
> 
>         Hi!
> 
>  Compiled pal with libncursesw5 so that pal -m doesn't spit out strange
> characters at me. Now I noticed one weirdness: The cursor position seem
> to be calculated directly by byte amount instead of character amount -
> which makes the cursor move two characters for every 8bit characters
> instead of just one.

Really, I see this:

/* returns the length of the next word */
static gint pal_output_wordlen(gchar* string)
{
    gchar* p = string;
    int i=0;
    while(*p != ' ' && *p != '\0')
    {
        p = g_utf8_next_char(p);
        i++;
    }

    return i;
}

Which counts the number of characters, not bytes. Also wrong, but
doesn't appear to be what you're seeing. Can you provide an example?

Have a nice day,
-- 
Martijn van Oosterhout   <[EMAIL PROTECTED]>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while 
> boarding. Thank you for flying nlogn airlines.

Attachment: signature.asc
Description: Digital signature

Reply via email to