From d788673eb92d68d796f69e70ab2dddeb01778585 Mon Sep 17 00:00:00 2001 From: Emanuele Giaquinta Date: Fri, 1 Aug 2008 12:38:58 +0000 Subject: [PATCH] Set null encoding for file channels. git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4866 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/core/fe-common-core.c | 1 + src/fe-common/core/fe-core-commands.c | 1 + src/fe-common/core/fe-help.c | 1 + 3 files changed, 3 insertions(+) diff --git a/src/fe-common/core/fe-common-core.c b/src/fe-common/core/fe-common-core.c index f97aa7e4..88841f37 100644 --- a/src/fe-common/core/fe-common-core.c +++ b/src/fe-common/core/fe-common-core.c @@ -402,6 +402,7 @@ static void autorun_startup(void) return; } + g_io_channel_set_encoding(handle, NULL, NULL); buf = g_string_sized_new(512); while (g_io_channel_read_line_string(handle, buf, &tpos, NULL) == G_IO_STATUS_NORMAL) { buf->str[tpos] = '\0'; diff --git a/src/fe-common/core/fe-core-commands.c b/src/fe-common/core/fe-core-commands.c index 765e70c6..8120479c 100644 --- a/src/fe-common/core/fe-core-commands.c +++ b/src/fe-common/core/fe-core-commands.c @@ -137,6 +137,7 @@ static void cmd_cat(const char *data) return; } + g_io_channel_set_encoding(handle, NULL, NULL); g_io_channel_seek_position(handle, fpos, G_SEEK_SET, NULL); buf = g_string_sized_new(512); while (g_io_channel_read_line_string(handle, buf, &tpos, NULL) == G_IO_STATUS_NORMAL) { diff --git a/src/fe-common/core/fe-help.c b/src/fe-common/core/fe-help.c index f3eec5fb..b51b8949 100644 --- a/src/fe-common/core/fe-help.c +++ b/src/fe-common/core/fe-help.c @@ -142,6 +142,7 @@ static int show_help_file(const char *file) if (handle == NULL) return FALSE; + g_io_channel_set_encoding(handle, NULL, NULL); buf = g_string_sized_new(512); /* just print to screen whatever is in the file */ while (g_io_channel_read_line_string(handle, buf, &tpos, NULL) == G_IO_STATUS_NORMAL) {