Remove get_utf8_char/utf16_char_to_utf8 in favour of glib

g_utf8_get_char_validated/g_unichar_to_utf8.


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4893 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Emanuele Giaquinta 2008-11-10 11:59:31 +00:00 committed by exg
commit 7b529aa530
4 changed files with 15 additions and 128 deletions

View file

@ -295,7 +295,7 @@ static void paste_send(void)
active_win->active);
g_string_truncate(str, 0);
} else if (active_entry->utf8) {
out[utf16_char_to_utf8(arr[i], out)] = '\0';
out[g_unichar_to_utf8(arr[i], out)] = '\0';
g_string_append(str, out);
} else if (term_type == TERM_TYPE_BIG5) {
if (arr[i] > 0xff)
@ -490,7 +490,7 @@ static void sig_gui_key_pressed(gpointer keyp)
}
} else {
/* need to convert to utf8 */
str[utf16_char_to_utf8(key, str)] = '\0';
str[g_unichar_to_utf8(key, str)] = '\0';
}
if (strcmp(str, "^") == 0) {

View file

@ -389,7 +389,7 @@ static void term_addch_utf8(TERM_WINDOW *window, unichar chr)
char buf[10];
int i, len;
len = utf16_char_to_utf8(chr, buf);
len = g_unichar_to_utf8(chr, buf);
for (i = 0; i < len; i++)
putc(buf[i], window->term->out);
}