Fixes for Chinese multibyte characters handling and cursor movement, patch

by Wang WenRui


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3244 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2004-03-24 17:28:55 +00:00 committed by cras
commit db705a8396
5 changed files with 143 additions and 61 deletions

View file

@ -300,6 +300,10 @@ static void paste_send(void)
} else if (active_entry->utf8) {
out[utf16_char_to_utf8(arr[i], out)] = '\0';
g_string_append(str, out);
} else if (term_type == TERM_TYPE_BIG5) {
if (arr[i] > 0xff)
g_string_append_c(str, (arr[i] >> 8) & 0xff);
g_string_append_c(str, arr[i] & 0xff);
} else {
g_string_append_c(str, arr[i]);
}