mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 20:33:46 +02:00
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:
parent
04ea54a1a0
commit
7b529aa530
4 changed files with 15 additions and 128 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue