diff options
author | Simon Zheng <simon.zheng@sun.com> | 2006-04-05 11:42:30 +0800 |
---|---|---|
committer | Simon Zheng <simonz@src.gnome.org> | 2006-04-05 11:42:30 +0800 |
commit | c81ee160b5a912e7d62c1be5064077be3106393c (patch) | |
tree | 7cce87031b404c69fedc9d2544ffcf8591ec9688 /calendar/gui | |
parent | 6761feca240609a6e30981a1e24cadf80bce3f3f (diff) | |
download | gsoc2013-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/gui')
-rw-r--r-- | calendar/gui/dialogs/comp-editor-util.c | 10 |
1 files changed, 5 insertions, 5 deletions
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; } } |