Mercurial > geeqie.yaz
diff src/editors.c @ 926:978f52f8a79d
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.
author | zas_ |
---|---|
date | Thu, 24 Jul 2008 20:24:04 +0000 |
parents | 8adf248bf5c9 |
children | e73552743bda |
line wrap: on
line diff
--- 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);