aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog7
-rw-r--r--calendar/gui/dialogs/comp-editor-util.c10
2 files changed, 12 insertions, 5 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index e827bbb4fd..b2c8997191 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,10 @@
+2006-04-05 Simon Zheng <simon.zheng@sun.com>
+
+ 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.
+
2006-04-04 Irene Huang <Irene.Huang@sun.com>
Fixes bug 335214
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;
}
}