mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Set null encoding for file channels.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4866 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
13849ba4f2
commit
d788673eb9
@ -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';
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user