From c81ee160b5a912e7d62c1be5064077be3106393c Mon Sep 17 00:00:00 2001 From: Simon Zheng Date: Wed, 5 Apr 2006 03:42:30 +0000 Subject: Fixes bug #333704 Because the passing text is in UTF-8 encoding, it should 2006-04-05 Simon Zheng Fixes bug #333704 * gui/dialogs/comp-editor-util.c: (comp_editor_strip_categories): Because the passing text is in UTF-8 encoding, it should be traversed by utf-8 char order rather than one by one byte. svn path=/trunk/; revision=31767 --- calendar/gui/dialogs/comp-editor-util.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'calendar/gui/dialogs') diff --git a/calendar/gui/dialogs/comp-editor-util.c b/calendar/gui/dialogs/comp-editor-util.c index ed30622df6..b752e2ac48 100644 --- a/calendar/gui/dialogs/comp-editor-util.c +++ b/calendar/gui/dialogs/comp-editor-util.c @@ -303,12 +303,12 @@ comp_editor_strip_categories (const char *categories) start = end = NULL; new_p = new_categories; - for (p = categories; *p; p++) { - int c; + for (p = categories; *p; p = g_utf8_next_char (p)) { + gunichar c; - c = *p; + c = g_utf8_get_char (p); - if (isspace (c)) + if (g_unichar_isspace (c)) continue; else if (c == ',') { int len; @@ -329,7 +329,7 @@ comp_editor_strip_categories (const char *categories) start = p; end = p; } else - end = p; + end = g_utf8_next_char(p) - 1; } } -- cgit v1.2.3