Mercurial > pidgin
changeset 12697:9c2a4e327718
[gaim-migrate @ 15040]
trex005 found a bug. Essentially, one can't assume a unichar is a char. It's fixed now.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Tue, 03 Jan 2006 17:52:50 +0000 |
parents | 18e619ed4eaf |
children | e5f79b206d7e |
files | plugins/spellchk.c |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/spellchk.c Tue Jan 03 13:55:42 2006 +0000 +++ b/plugins/spellchk.c Tue Jan 03 17:52:50 2006 +0000 @@ -121,11 +121,15 @@ static gchar * make_word_proper(const gchar *word) { - gchar *state = g_utf8_strdown(word, -1); + char buf[7]; + gchar *lower = g_utf8_strdown(word, -1); + gchar *ret; - state[0] = g_unichar_toupper(g_utf8_get_char(word)); + g_unichar_to_utf8(g_unichar_toupper(g_utf8_get_char(word)), buf); + ret = g_strconcat(buf, g_utf8_offset_to_pointer(lower, 1), NULL); + g_free(lower); - return state; + return ret; } static gboolean