From 993a1a228e4216e55a78d0ad90feae3de20172cd Mon Sep 17 00:00:00 2001 From: David Hampton Date: Sun, 12 Jan 2003 21:15:00 +0000 Subject: [PATCH] Return the number of characters entered, not the length of the encoded multi-byte string. Possible fix for 99419 and 102057. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7815 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 7 +++++++ src/register/register-gnome/gnucash-sheet.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a45a34befb..6b8ab0912d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-01-12 David Hampton + + * src/register/register-gnome/gnucash-sheet.c + (gnucash_sheet_insert_cb): Return the number of characters + entered, not the length of the encoded multi-byte string. Possible + fix for 99419 and 102057. + 2003-01-11 Derek Atkins * src/business/business-core/gncBusGuile.[ch]: functions to interface diff --git a/src/register/register-gnome/gnucash-sheet.c b/src/register/register-gnome/gnucash-sheet.c index a4c0118061..c662557e2a 100644 --- a/src/register/register-gnome/gnucash-sheet.c +++ b/src/register/register-gnome/gnucash-sheet.c @@ -906,7 +906,7 @@ gnucash_sheet_insert_cb (GtkWidget *widget, } if (*position < 0) - *position = strlen (retval); + *position = gnc_mbstowcs(NULL, retval); gtk_entry_select_region (GTK_ENTRY(sheet->entry), start_sel, end_sel);