# HG changeset patch # User zas_ # Date 1216931044 0 # Node ID 978f52f8a79df74c03897340d9fcc96c058f027a # Parent 373c370887bbcc8bd854e28e5103762e448ce0cd Set GIO channels to binary encoding. This is needed since messages from commands may not be UTF8-encoded and g_io_channel_read_chars() may incorrectly interpret some characters. In practice it was truncating some ISO-8859-1 messages containing some french characters. This fixes it. diff -r 373c370887bb -r 978f52f8a79d src/editors.c --- a/src/editors.c Thu Jul 24 20:03:57 2008 +0000 +++ b/src/editors.c Thu Jul 24 20:24:04 2008 +0000 @@ -655,6 +655,7 @@ channel_output = g_io_channel_unix_new(standard_output); g_io_channel_set_flags(channel_output, G_IO_FLAG_NONBLOCK, NULL); + g_io_channel_set_encoding(channel_output, NULL, NULL); g_io_add_watch_full(channel_output, G_PRIORITY_HIGH, G_IO_IN | G_IO_ERR | G_IO_HUP, editor_verbose_io_cb, ed, NULL); @@ -662,6 +663,7 @@ channel_error = g_io_channel_unix_new(standard_error); g_io_channel_set_flags(channel_error, G_IO_FLAG_NONBLOCK, NULL); + g_io_channel_set_encoding(channel_error, NULL, NULL); g_io_add_watch_full(channel_error, G_PRIORITY_HIGH, G_IO_IN | G_IO_ERR | G_IO_HUP, editor_verbose_io_cb, ed, NULL);