Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#456 Nick Completion error with multibyte string

closed-duplicate
nobody
None
5
2003-12-17
2003-11-15
Anonymous
No

After completion multi-byte nick (has same byte),
outputs are broken..

And Here's my patch..

if semi completed string is not valid UTF8 string..
then crop..

--- fkeys.c_org 2003-11-16 03:08:35.389375424 +0900
+++ fkeys.c 2003-11-16 03:09:56.131100816 +0900
@@ -2168,6 +2168,12 @@
}
}

+ /* avoid Multibyte nick completion error */
+ char* valid_end;
+ g_utf8_validate( buf, -1, &valid_end );
+ (*valid_end) = 0;
+ /* my_patch ended */
+
gtk_entry_set_text (GTK_ENTRY (t), buf);
/* GeEkMaN: Restore the last cursor position */
gtk_editable_set_position (GTK_EDITABLE (t), cursor_pos);

Discussion

  • Peter Zelezny.
    Peter Zelezny.
    2003-12-17

    • status: open --> closed-duplicate