aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorSimon Zheng <simon.zheng@sun.com>2006-04-05 11:42:30 +0800
committerSimon Zheng <simonz@src.gnome.org>2006-04-05 11:42:30 +0800
commitc81ee160b5a912e7d62c1be5064077be3106393c (patch)
tree7cce87031b404c69fedc9d2544ffcf8591ec9688 /calendar
parent6761feca240609a6e30981a1e24cadf80bce3f3f (diff)
downloadgsoc2013-evolution-c81ee160b5a912e7d62c1be5064077be3106393c.tar
gsoc2013-evolution-c81ee160b5a912e7d62c1be5064077be3106393c.tar.gz
gsoc2013-evolution-c81ee160b5a912e7d62c1be5064077be3106393c.tar.bz2
gsoc2013-evolution-c81ee160b5a912e7d62c1be5064077be3106393c.tar.lz
gsoc2013-evolution-c81ee160b5a912e7d62c1be5064077be3106393c.tar.xz
gsoc2013-evolution-c81ee160b5a912e7d62c1be5064077be3106393c.tar.zst
gsoc2013-evolution-c81ee160b5a912e7d62c1be5064077be3106393c.zip
Fixes bug #333704 Because the passing text is in UTF-8 encoding, it should
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. svn path=/trunk/; revision=31767
Diffstat (limited to 'calendar')
-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;
}
}